Hello,
I'm trying to do a simulation of 3 types of errors in stata. I have to create one that is E(e1|x)=0, another that is E(e2|x)=constant and E(e3|x)=0 with corrX,e3=0.2
Till now I have this in the do file:
set seed 10000
set obs 10000
g x = invnormal(uniform())
sum x
g e1 = invnormal(uniform())
sum e1
g e2 = invnormal(uniform()) + 1
sum e2
g e3 = invnormal(uniform())?????
corr x e1
corr x e2
corr x e3
I don't know how to do the third error,
Thanks
I'm trying to do a simulation of 3 types of errors in stata. I have to create one that is E(e1|x)=0, another that is E(e2|x)=constant and E(e3|x)=0 with corrX,e3=0.2
Till now I have this in the do file:
set seed 10000
set obs 10000
g x = invnormal(uniform())
sum x
g e1 = invnormal(uniform())
sum e1
g e2 = invnormal(uniform()) + 1
sum e2
g e3 = invnormal(uniform())?????
corr x e1
corr x e2
corr x e3
I don't know how to do the third error,
Thanks
Comment