<jupyter_start><jupyter_text>Main examples<jupyter_code>beta0 = 1.
beta1 = .25

def gen_data(beta0=beta0,beta1=beta1):
    nobs = 500
    #parameters
    sigma = 1
    
    epsilon = stats.norm.rvs(loc=0,scale=sigma,size=nobs)
    #censor data below x<0?
    x = stats.norm.rvs(loc=5,scale=5,size=nobs)
    y = beta0+ beta1*x + epsilon
    
    #censor
    y[y<=0] = 0
    return y,x,nobs


mc_out = vuong_tests4.monte_carlo(1,gen_data,setup_shi)
vuong_tests4.print_mc(mc_out)
beta0 = 1.
beta1 = .5

def gen_data(beta0=beta0,beta1=beta1):
    nobs = 500
    #parameters
    sigma = 1
    
    epsilon = stats.norm.rvs(loc=0,scale=sigma,size=nobs)
    #censor data below x<0?
    x = stats.norm.rvs(loc=5,scale=5,size=nobs)
    y = beta0+ beta1*x + epsilon
    
    #censor
    y[y<=0] = 0
    return y,x,nobs


mc_out = vuong_tests4.monte_carlo(1,gen_data,setup_shi)
vuong_tests4.print_mc(mc_out)
beta0 = 1.
beta1 = 1.

def gen_data(beta0=beta0,beta1=beta1):
    nobs = 500
    #parameters
    sigma = 1
    
    epsilon = stats.norm.rvs(loc=0,scale=sigma,size=nobs)
    #censor data below x<0?
    x = stats.norm.rvs(loc=5,scale=5,size=nobs)
    y = beta0+ beta1*x + epsilon
    
    #censor
    y[y<=0] = 0
    return y,x,nobs


mc_out = vuong_tests4.monte_carlo(1,gen_data,setup_shi)
vuong_tests4.print_mc(mc_out)<jupyter_output>reg: [0. 1. 0.], boot1: [0. 1. 0.], boot2: [0. 1. 0.], llr:220.75407502695867, std: 46.187186203191075, omega:2.026734139817817
[0.26 0.74 0.  ]<jupyter_text>Misc examples<jupyter_code>def gen_data(beta0=beta0,beta1=1):
    nobs = 1000
    #parameters
    sigma = 1
    
    epsilon = stats.norm.rvs(loc=0,scale=sigma,size=nobs)
    #censor data below x<0?
    x = stats.norm.rvs(loc=5,scale=5,size=nobs)
    y = beta0+ beta1*x + epsilon
    
    #censor
    y[y<=0] = 0
    return y,x,nobs

mc_out = vuong_tests4.monte_carlo(1,gen_data,setup_shi)
vuong_tests4.print_mc(mc_out)
def gen_data(beta0=beta0,beta1=1):
    nobs = 1000
    #parameters
    sigma = 1
    
    epsilon = stats.norm.rvs(loc=0,scale=sigma,size=nobs)
    #censor data below x<0?
    x = stats.norm.rvs(loc=5,scale=5,size=nobs)
    y = beta0+ beta1*x + epsilon
    m = beta0 + epsilon
    #censor
    y[m<=0] = 0
    return y,x,nobs
    
mc_out = vuong_tests4.monte_carlo(1,gen_data,setup_shi)
vuong_tests4.print_mc(mc_out)
beta0 = 1.
beta1 = .25

def gen_data(beta0=beta0,beta1=beta1):
    nobs = 1000
    #parameters
    sigma = 2
    
    epsilon = stats.norm.rvs(loc=0,scale=sigma,size=nobs)
    #censor data below x<0?
    x = stats.norm.rvs(loc=5,scale=5,size=nobs)
    y = beta0+ beta1*x + epsilon
    
    #censor
    y[y<=0] = 0
    return y,x,nobs


mc_out = vuong_tests4.monte_carlo(1,gen_data,setup_shi)
vuong_tests4.print_mc(mc_out)<jupyter_output>reg: [0. 0. 1.], boot1: [0. 0. 1.], boot2: [0. 0. 1.], llr:-106.7650665605856, std: 8.647186532290823, omega:0.28901176399794165
[0. 0. 1.]
{'fraction_non_alphanumeric': 0.14438318401102687, 'fraction_numerical': 0.0923501033769814, 'mean_word_length': 3.3328358208955224, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '298424', 'license': 'MIT', 'n_tokens_mistral': 1477, 'n_tokens_neox': 1327, 'n_words': 219, 'path': 'missing/bootstrap_ols_novar.ipynb', 'repo_name': 'ericschulman/nash', 'size': '2902'}