Sample Distributions
Posted: Thu Feb 09, 2012 11:19 pm
Hello,
I was asked to take 200 samples of 5 observations from 1000 observations and run regression with OLS method.
(observation 1-5, 6-10, and so forth.)
I entered the following but they tell me "i" is not defined. Can someone tell me what I did wrong here?
vector(200) beta
for !i=1 to 200
smpl (!i-1)*5+1 !i*5
ls y=c(1) +c(2)*x
beta(!i)=@coefs(2)
next
Any help is appreciated.
Thanks in advance :)
I was asked to take 200 samples of 5 observations from 1000 observations and run regression with OLS method.
(observation 1-5, 6-10, and so forth.)
I entered the following but they tell me "i" is not defined. Can someone tell me what I did wrong here?
vector(200) beta
for !i=1 to 200
smpl (!i-1)*5+1 !i*5
ls y=c(1) +c(2)*x
beta(!i)=@coefs(2)
next
Any help is appreciated.
Thanks in advance :)