Probit Simulation Code

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

PermaBear
Posts: 4
Joined: Mon Oct 24, 2011 2:02 am

Probit Simulation Code

Postby PermaBear » Fri Oct 28, 2011 5:45 am

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

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

Re: Probit Simulation Code

Postby startz » Fri Oct 28, 2011 6:39 am

Looks like you've generated continuous rather than discrete y values.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests