Dear all,
I was trying to generate samples of 50 observations in a Monte Carlo loop
and then just use the first 25 to estimate by OLS. I wrote these
instructions:
nulldata 50
genr x=100*uniform()
loop 1000
genr eps=3*normal()
genr y=5+2*x+eps
smpl (obs<26) --restrict
ols y const x
genr bhat=coeff(x)
store test.gdt bhat
endloop
But, when I run the program and open the test.gdt data file, I only get 1
observation of the variable bhat, instead of the 1000 I was supposed to get.
I have tried a thousand different things and I do not get right. Any hint?