Page 1 of 1

Probit Simulation Code

Posted: Fri Oct 28, 2011 5:45 am
by PermaBear
Hey. I am trying to simulate a univariate probit model. I have the beta values from previous probit regression and want to generate a new Y vector of zeros and ones using known data from my x vector. Then using my simulated y vector I want to generate a vector of betas. When I run the following:

Code: Select all

series x=m2mod 'm2mod is a vector of known data in my workfile rndseed 123456 !reps=10 matrix(!reps,2) beta for !i=1 to !reps series y = 0.588072 + 3.62E-05*x +0.494347*nrnd ' these values stem from my pre-simulation estimation of the univariate probit model equation bn1.binary(D=N) y c x beta(!i,1)=eq1.@coefs(1) beta(!i,2)=eq1.@coefs(2) next beta.stats

I get the following error message:

Insufficient number of observations after excluding missing and non-(0-1) observations in "EQUAITON BN!.BINARY(D=N) Y C X".

I should add that simply using least squares simulation it works fine.

Any help would be greatly appreciated. thanks

Re: Probit Simulation Code

Posted: Fri Oct 28, 2011 6:39 am
by startz
Looks like you've generated continuous rather than discrete y values.