Programs for: Simulating an empirical paper by the rational economist



Three stata do programs are needed:

Pr1. running
Pr2. set of single funnels
Pr3. joint programs

Here Pr1 make the full set of simulations using Pr3.
While Pr2 make one set of funnels.
Program Pr3 does not run separately.
To run the programs download then into a folder. Make sure that the cd line "E:\Google drev\MARTIN\ARBEJDE\AAC" is changed to refer to the said filder.

You should set the following in Pr1 and Pr2:
the settings made are the ones replicating the paper

****Parameters:
local ci = 0.05 // set confidence level
local r = 1000 // number of funnels
local N = 500 // number of regressions in each funnel
local obs = 20 // number of observations of the regressions. Start of m-loop, see paper
local mint = 2 // minimum acceptable t value (needed to determine point a)

****Variables:
local x_mean = 0 // mean of x
local e_mean = 0 // mean of error term
local x_sd = 2 // standard deviation of x
local e_sd = 10 // standard deviation of error term
local beta = 1 // set true parameter for beta

****Set j, one or more values foreach j in 1 2 5 10 15 23 34 50 {
For all j's your pc will run for about a week, so take one at a time
When running, it needs a prompt once or twice in the beginning
But once the counting starts it just runs and set one '.' for each funnel

Output:
The program generates two folders in the program folder
dataset with stata.dta output for each SR
output with excell files
Both sets of output has the same format as Tables 2 to 6 in the paper