% usefile C:\monographregression\computercode\prg\bayesx\patent_additive.txt % Create a dataset object and read the data dataset d d.infile using C:\monographregression\computercode\data\bayesx\patentdata_additivemodel.raw % Set a new delimiter delimiter=; % Create a regression object bayesreg b; % Define the path where to save the results b.outfile = C:\monographregression\computercode\results\bayesx\patent_b_add; % Additive model with nonlinear effect of ncountry, hyperparameters for inverse gamma prior a=b=0.001 (default) % option predict provides goodness of fit measures, influence and outlier measures etc. b.regress opp = ncountry(psplinerw2) + yearc + ncit + nclaims + ustwin + patus + patgsgr , setseed=12345 family=binomial iterations=32000 predict burnin=2000 step=30 using d; b.getsample; b.autocor; % For comparison: a linear (orthogonal) polynomial for ncountry b.outfile = C:\monographregression\computercode\results\bayesx\patent_b_lin; b.regress opp = ncountryo + yearc + ncit + nclaims + ustwin + patus + patgsgr , setseed=12345 family=binomial iterations=32000 predict burnin=2000 step=30 using d; % For comparison: a cubic (orthogonal) polynomial for ncountry b.outfile = C:\monographregression\computercode\results\bayesx\patent_b_cubic; b.regress opp = ncountryo + ncountryo2 + ncountryo3 + yearc + ncit + nclaims + ustwin + patus + patgsgr , setseed=12345 family=binomial iterations=32000 predict burnin=2000 step=30 using d; % Sensitivity analysis % Additive model with nonlinear effect of ncountry, hyperparameters for inverse gamma prior a=b=0.0001 b.outfile = C:\monographregression\computercode\results\bayesx\patent_b_add_a00001_b00001; b.regress opp = ncountry(psplinerw2,a=0.0001,b=0.0001) + yearc + ncit + nclaims + ustwin + patus + patgsgr , setseed=12345 family=binomial iterations=32000 predict burnin=2000 step=30 using d; % Additive model with nonlinear effect of ncountry, hyperparameters for inverse gamma prior a=b=0.00001 b.outfile = C:\monographregression\computercode\results\bayesx\patent_b_add_a000001_b000001; b.regress opp = ncountry(psplinerw2,a=0.00001,b=0.00001) + yearc + ncit + nclaims + ustwin + patus + patgsgr , setseed=12345 family=binomial iterations=32000 predict burnin=2000 step=30 using d; % Additive model with nonlinear effect of ncountry, hyperparameters for inverse gamma prior a=1, b=0.001 b.outfile = C:\monographregression\computercode\results\bayesx\patent_b_add_a1_b0001; b.regress opp = ncountry(psplinerw2,a=1,b=0.001) + yearc + ncit + nclaims + ustwin + patus + patgsgr , setseed=12345 family=binomial iterations=32000 predict burnin=2000 step=30 using d;