% usefile C:\monographregression\computercode\prg\bayesx\patent.txt % HINT: % The program assumes that all files are stored in % C:\monographregression\computercode % change directory if code is located elsewhere % To store results you have to create a subfolder `results' (or any other folder defined in % the outfile command, see below) % To execute this program copy the usefile command above in the command window of BayesX % Create a dataset object and read the data dataset d d.infile using C:\monographregression\computercode\data\bayesx\patent.raw % Create a regression object bayesreg b % Define the path where to save the results b.outfile = C:\monographregression\computercode\results\patentlin % Set a new delimiter delimiter = ; % Bayesian Poisson model with purely linear effects b.regress ncit = yearc + ncountryc + nclaimsc + biopharm + ustwin + patus + patgsgr + opp, iterations=52000 step=50 burnin=2000 setseed=12345 family=poisson using d; % Save the sampling paths b.getsample; % Bayesian Poisson model with nonlinear effects b.outfile = C:\monographregression\computercode\results\patentextended; b.regress ncit = yearc + year2c + year3c + ncountryc + ncountry2c + ncountry3c + nclaimsc + nclaims2c + nclaims3c + biopharm + ustwin + patus + patgsgr + opp, iterations=52000 step=50 burnin=2000 setseed=12345 family=poisson using d; b.getsample;