[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: AW: Probit Model with Instrumental variables |

Date |
Mon, 27 Apr 2009 09:18:51 +0200 |

<> Well, it does run for "4.5", and as you -set seed- you should get the same behavior. Note I alerted you to the fact that "4" was just a guess on my part. What you can do is sneak a ************* proportion y ************* into your -program- after the last -generate- and let it run to see what kind of distribution of "y" you get from the statement. For the case of "4", it is 98% vs 2%, which may or may not be what you want. Also note that an error is easier to diagnose when you run the -prog- by typing "endoprob" than when -simulate- executes it. HTH Martin -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Sachin Chintawar Gesendet: Montag, 27. April 2009 01:42 An: statalist@hsphsun2.harvard.edu Betreff: st: Probit Model with Instrumental variables 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/ * * 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/

**References**:**st: Probit Model with Instrumental variables***From:*Sachin Chintawar <schint1@tigers.lsu.edu>

- Prev by Date:
**Re: st: imputing continuous values when respondents select categories, e.g., income category** - Next by Date:
**Re: st: Postestimation procedures multiple data sets** - Previous by thread:
**st: Probit Model with Instrumental variables** - Next by thread:
**st: Postestimation procedures multiple data sets** - Index(es):

© Copyright 1996–2014 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |