Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

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

From |
Nick Cox <njcoxstata@gmail.com> |

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

Subject |
Re: st: -gmm- heckman problem |

Date |
Tue, 18 Sep 2012 21:02:20 +0100 |

Pedantry corner: Heckman is a

Nick On 18 Sep 2012, at 20:42, shetty sandeep <getsane@hotmail.com> wrote:

I am trying to estimate a heckman wage model using gmm. But I amfacing a problem with the stata -gmm- command. I consistently get anerror as "{ invalid name". The inverse mills ratio in the secondstage moment condition seems to be the problem. My code is pastedbelow. It is likely that I may have some conceptual issues with gmmheckman. Any help is greatly appreciated.~~~~~~~~~~~~code~~~~~~~~~~global xb "{b1}*tage+{b2}*sqage+{b3}*child18+{b4}*marry+{b5}*faminc+{b6}*famsize+{b7}*metro+{b8}*race+{b9}*firmsize+{b0}" //>0global phi "normalden($xb)" //>0 global Phi "normal($xb)" //>0 global mil "$phi/$Phi" //>0global a1 "($phi/($Phi*(1-$Phi)))*(trad-$Phi)" // derivative of theselection likelihood//eq 2global xb2 "{beta1=0.02}*tage+{beta2=-0.0004}*sqage+{beta3=-0.007}*marry+{beta4}*metro+{beta5}*race+{beta6=1}*firmsize+{beta0=1}" //wage equationgmm (eq1: $a1)(eq2: lwr1-$xb2-{gamma}*($phi/$Phi)), ///instruments(eq1: tage sqage child18 marry faminc famsize metro racefirmsize) ///instruments(eq2: tage sqage marry metro race firmsize $phi $Phi)winitial(identity)~~~~~~~~~~~~~~~~~~~~~~~~~~I have also tried using $mills as an instrument in which case I getan error as "numlist in operator invalid". I figured out that thedivision operator "/ " in instruments option of gmm is reserved forlags.

* * 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/

**Follow-Ups**:**RE: st: -gmm- Heckman problem***From:*shetty sandeep <getsane@hotmail.com>

**References**:**st: -gmm- heckman problem***From:*shetty sandeep <getsane@hotmail.com>

- Prev by Date:
**Re: st: changing bar order on twoway bar chart** - Next by Date:
**st: Developing a Predictive Risk Equation from stcox survival analysis** - Previous by thread:
**st: -gmm- heckman problem** - Next by thread:
**RE: st: -gmm- Heckman problem** - Index(es):