Statalist


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

st: RE: AW: Re: Combining Heckman and Tobit Models


From   Liam C Downey <[email protected]>
To   <[email protected]>
Subject   st: RE: AW: Re: Combining Heckman and Tobit Models
Date   Wed, 22 Apr 2009 08:22:31 -0600

Thank you. The problem with my model was that you cannot use the 'cluster'
option with the two-step Heckman command. However, your response guided me
in the right direction.

Thanks again.

Liam



-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Martin Weiss
Sent: Wednesday, April 22, 2009 1:29 AM
To: [email protected]
Subject: st: AW: Re: Combining Heckman and Tobit Models

<> 

My code did not wrap well in some email programs, which may lead to errors,
so here it is again with line breaks inserted

*************
webuse womenwk, clear

qui{
heckman wage educ age, select(married children educ age) ///
 mills(mymills) two first
estimates store heck
reg wage educ age mymills
}
estimates table heck ., drop(select:) ///
equations(1) style(oneline)
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Martin Weiss
Gesendet: Dienstag, 21. April 2009 23:58
An: [email protected]
Betreff: st: Re: Combining Heckman and Tobit Models

<>

"But when I insert the inverse mills ratio into a regular OLS model to
compare results to a regular Heckman model, I get very different results
across the 2 models."

My results are identical...

*****
webuse womenwk, clear

qui{
heckman wage educ age, select(married children educ age) mills(mymills) two 
first
estimates store heck
reg wage educ age mymills
}
estimates table heck ., drop(select:) equations(1) style(oneline)
*****


HTH
Martin
_______________________
----- Original Message ----- 
From: "Liam C Downey" <[email protected]>
To: <[email protected]>
Sent: Tuesday, April 21, 2009 8:21 PM
Subject: st: Combining Heckman and Tobit Models


>I would like to run a Tobit model using the the Heckman correction. I
> believe there are 2 options available to me. One is to do it using the
> commands available in the cmp.ado file. However, I run into 2 problems
> here. The first is that it takes a very long time to run a Tobit model
> using the following cmp command syntax:
>
> . cmp (fem_inc = kids male_educ), ind("cond(fem_inc, $cmp_cont, 
> $cmp_left)")
> qui
>
> So one thing I am wondering is if there is a better way to run a tobit 
> model
> using cmp.
>
>
> The other option, I believe, is to calculate the inverse mills ratio for 
> the
> selection equation and then manually insert the ratio into a Tobit model.
> But when I insert the inverse mills ratio into a regular OLS model to
> compare results to a regular Heckman model, I get very different results
> across the 2 models. However, the mills-inserted OLS results are very
> similar to the results I get when I run a Heckman model using the cmp
> commands (commands for the various models are listed below). So I am
> wondering if anyone knows why the cmp and manually inserted mills ratio
> results are similar to each other but different from the regular Heckman
> results. Am I using the wrong equations to calculate the inverse mills
> ratio? Is it due to differences in estimation procedures across the
> different modeling contexts? Some other reason?
>
> Thanks for your help,
>
> Liam
>
>
> REGULAR HECKMAN MODEL
> heckman onsrel_td onsrel_to nhblackr educo adjfinco countyear,
> select(movetrct = onsrel_to nhblackr educo adjfinco age agesq female
> couple_o tkidso ownero pperrmo samehs3o countyear ) cluster (id)
>
>
>
> MANUALLY INSERTING INVERSE MILLS INTO OLS MODEL
>
> I first run a probit model, then calculate the inverse mills, then insert 
> it
> into an OLS equation.
>
>
> probit movetrct onsrel_to nhblackr educo adjfinco age agesq female 
> couple_o
> tkidso ownero pperrmo samehs3o countyear, cluster (id)
>
> predict p1, xb
> generate phi = (1/sqrt(2*_pi))*exp(-(p1^2/2))
> generate capphi = normal(p1)
> gen mills1 = phi/capphi
>
> generate cap = normalden(p1)
> gen mills2 = cap/capphi
>
>
> regress onsrel_td onsrel_to nhblackr educo adjfinco countyear mills1,
> cluster(id)
>
> or
>
> regress onsrel_td onsrel_to nhblackr educo adjfinco countyear mills2,
> cluster(id)
>
>
>
> CMP COMMANDS
> . cmp setup
>
> . cmp (onsrel_td = onsrel_to nhblackr educo adjfinco countyear) (movetrct 
> =
> onsrel_to nhblackr educo adjfinco age agesq female
> couple_o tkidso ownero pperrmo samehs3o countyear), ind($cmp_cont
> $cmp_probit) nolr qui cluster(id)
>
>
>
>
> *
> *   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/


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



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