------------------------------------------------------------------------------------ name: log: /Users/projection/Desktop/Econ 311/Class 2-3-14/Class 9-25-17.log log type: text opened on: 25 Sep 2017, 11:21:32 . do "/Users/projection/Desktop/Econ 311/Class 2-3-14/olstest.do" . program olstest 1. . g e = rnormal(0,0.3) 2. g y = 10+3*x+e 3. reg y x 4. drop e 5. drop y 6. . end . end of do-file . simulate b=_b[x] sterr=_se[x] , reps(5000): olstest command: olstest b: _b[x] sterr: _se[x] Simulations (5000) ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 .................................................. 50 .................................................. 100 .................................................. 150 .................................................. 200 .................................................. 250 .................................................. 300 .................................................. 350 .................................................. 400 .................................................. 450 .................................................. 500 .................................................. 550 .................................................. 600 .................................................. 650 .................................................. 700 .................................................. 750 .................................................. 800 .................................................. 850 .................................................. 900 .................................................. 950 .................................................. 1000 .................................................. 1050 .................................................. 1100 .................................................. 1150 .................................................. 1200 .................................................. 1250 .................................................. 1300 .................................................. 1350 .................................................. 1400 .................................................. 1450 .................................................. 1500 .................................................. 1550 .................................................. 1600 .................................................. 1650 .................................................. 1700 .................................................. 1750 .................................................. 1800 .................................................. 1850 .................................................. 1900 .................................................. 1950 .................................................. 2000 .................................................. 2050 .................................................. 2100 .................................................. 2150 .................................................. 2200 .................................................. 2250 .................................................. 2300 .................................................. 2350 .................................................. 2400 .................................................. 2450 .................................................. 2500 .................................................. 2550 .................................................. 2600 .................................................. 2650 .................................................. 2700 .................................................. 2750 .................................................. 2800 .................................................. 2850 .................................................. 2900 .................................................. 2950 .................................................. 3000 .................................................. 3050 .................................................. 3100 .................................................. 3150 .................................................. 3200 .................................................. 3250 .................................................. 3300 .................................................. 3350 .................................................. 3400 .................................................. 3450 .................................................. 3500 .................................................. 3550 .................................................. 3600 .................................................. 3650 .................................................. 3700 .................................................. 3750 .................................................. 3800 .................................................. 3850 .................................................. 3900 .................................................. 3950 .................................................. 4000 .................................................. 4050 .................................................. 4100 .................................................. 4150 .................................................. 4200 .................................................. 4250 .................................................. 4300 .................................................. 4350 .................................................. 4400 .................................................. 4450 .................................................. 4500 .................................................. 4550 .................................................. 4600 .................................................. 4650 .................................................. 4700 .................................................. 4750 .................................................. 4800 .................................................. 4850 .................................................. 4900 .................................................. 4950 .................................................. 5000 . summarize Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------- b | 5,000 2.996717 .1405901 2.516112 3.531067 sterr | 5,000 .1410809 .0080964 .1075153 .1694181 . histogram b (bin=36, start=2.5161119, width=.0281932) . gen tstat=(b-3)/sterrr sterrr not found r(111); . gen tstat=(b-3)/sterr . histogram tstat (bin=36, start=-3.4598863, width=.20243247) . centile tstat , centile (2.5 97.5) -- Binom. Interp. -- Variable | Obs Percentile Centile [95% Conf. Interval] -------------+------------------------------------------------------------- tstat | 5,000 2.5 -1.943295 -2.010147 -1.884207 | 97.5 1.96152 1.874773 2.036298 . exit, clear