# st: Probit Model with Instrumental variables

 From Sachin Chintawar To statalist@hsphsun2.harvard.edu Subject st: Probit Model with Instrumental variables Date Sun, 26 Apr 2009 17:42:21 -0600

```Dear All
Well I did find why the results were contrary to the results published
by Buse. I did notice one thind that Martin help me do but cannot
figure out why and hope someone could help me
When I use the statement -generate y = 0.5 + 2*x1 + x2hat + mu + u>4-
the y generated is 1 or 0 with "4' from which on we want the dependent
to be 1. Unfortunately when I change the value from "4" to anything
above then it does not work giving an error message that
"May not drop an endogenous regressor".
This has left me puzzled and stumped. Any help would be greatly appreciated.
Thanks
Sachin
---------------------------------------Start
Example------------------------------------------------------;
global numobs 500             // sample size N
global numsims "500"         // number of simulations
set seed 123456789

capture program drop endoprob

program endoprob // , rclass
version 10.1
drop _all
set obs \$numobs
generate u = rnormal(0)
generate mu = rnormal(0)
generate v = rnormal(0)
//generate x = rnormal(0)
generate z1 = rnormal(0)   // 4 Instruements
generate z2 = rnormal(0)
generate z3 = rnormal(0)
generate z4 = rnormal(0)
// Also be written *drawnorm u mu x1 z1 z2 z3 z4
generate a = 0.4*u

generate x = 0.5 + 0.1*z1 + a
regress x  z1 // endogenous regressor with four instruments
predict px

generate y = 0.5 + px + mu + u > 4    //Reduced Form Equation
ivprobit y (x= z1 )
predict py
end
simulate _b _se y py , ///
reps(\$numsims): endoprob

mean x* y*
--------------------------------------------------------End
Program-------------------------------------------------------------
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```