Hi Everyone,
I am creating 100 random variables at the beginning as follows:
set obs 100
gen z1 = rnormal(6,1)
gen a=3
gen B=2
gen gama=1
gen y=a+B*z1+rnormal(0,1)
gen ym= y+ gama*rnormal(0,1)
I am trying to run regression of ym on z1 1,000 times. I want to record average,min,max of a and B (coefficients and constant) and R^2. Also I want to record t statistics for each regression.
Your helps will be appreciated.
Thanks in advance.
Ulas
I am creating 100 random variables at the beginning as follows:
set obs 100
gen z1 = rnormal(6,1)
gen a=3
gen B=2
gen gama=1
gen y=a+B*z1+rnormal(0,1)
gen ym= y+ gama*rnormal(0,1)
I am trying to run regression of ym on z1 1,000 times. I want to record average,min,max of a and B (coefficients and constant) and R^2. Also I want to record t statistics for each regression.
Your helps will be appreciated.
Thanks in advance.
Ulas
Comment