Monte Carlo for Censored varriable
Posted: Sat Dec 19, 2009 5:02 am
Hello
How I can write a Monte Carlo experiment for the following problem?????
Ysi=a+b*Xi+e
Create N = 200 random values of xi that are spread evenly (or uniformly) over the interval [0, 20]. These we will keep fixed in further simulations.
Obtain N = 200 random values ei from a normal distribution with mean 0 and variance 16.
Create N = 200 values of the latent variable. (Ysi)
Obtain N = 200 values of the observed yi using
Yi=0 if Ysi<=0
Yi=Ysi if Ysi>0
then estimate
Ysi=a+b*Xi+e
Yi=c+d*Xi+e
and save the vector of estimated coefficiants of equations written in above. In AandB vectores.
How I can write a Monte Carlo experiment for the following problem?????
Ysi=a+b*Xi+e
Create N = 200 random values of xi that are spread evenly (or uniformly) over the interval [0, 20]. These we will keep fixed in further simulations.
Obtain N = 200 random values ei from a normal distribution with mean 0 and variance 16.
Create N = 200 values of the latent variable. (Ysi)
Obtain N = 200 values of the observed yi using
Yi=0 if Ysi<=0
Yi=Ysi if Ysi>0
then estimate
Ysi=a+b*Xi+e
Yi=c+d*Xi+e
and save the vector of estimated coefficiants of equations written in above. In AandB vectores.