Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

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

From |
"J. Boreham" <jb648@cam.ac.uk> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Using a Tobit regression with the Heckman correction |

Date |
20 Dec 2011 19:19:10 +0000 |

"could not calculate numerical derivatives discontinuous region with missing values encountered" The code I used was: ******** craggit fee age agesq curr_app curr_goal_d curr_goal_m curr_goal_f, second(transferred age agesq curr_app curr_goal_d curr_goal_m curr_goal_f ******** Do you have any idea what may have caused this error? Thanks again for your help, John On Dec 17 2011, Tirthankar Chakravarty wrote:

You are looking for the truncated normal hurdle model, also called the Craggit model. It has been programmed up in Stata by William Burke (Stata Journal, Volume 9, Number 4): http://www.stata-journal.com/article.html?article=st0179 To install the command in Stata, type: net install st0179, /// from(http://www.stata-journal.com/software/sj9-4) T On Sat, Dec 17, 2011 at 2:17 PM, J. Boreham <jb648@cam.ac.uk> wrote:Thanks for your prompt response, and for the clarification.I think I need to take both types of Tobit into account. The "fee"variable is the transfer fee paid for footballers, so is only observedwhen "transferred" is equal to 1 - so there is a Type II Tobit. However,in addition, "fee" is always greater than or equal to 0, so there is aType I Tobit too.Am I right in thinking that the -heckman- command will account for theType II Tobit, but not the Type I Tobit? I attempted to account for bothby using the -tobit- command (to account for the Type I), and alsoincluding the inverse Mills ratio ("mills_ratio" below, to account forthe Type II). I fear, however, that this will result in invalid standarderrors, as the Heckman correction requires non-standard errors (as "theusual formulas for standard errors for least squares coefficients arenot appropriate" - Heckman, Sample Selection Bias as a SpecificationError, 1979)Thanks again for your time, John On Dec 17 2011, Tirthankar Chakravarty wrote:I think you might be mixing up a few things here. Both -heckman- and -tobit- fit Tobit (censored regression) models, i.e., where the outcome of interest is not fully observed in the sample. They differ in what they posit the censoring mechanism to be. 1) The model fitted by -tobit- is what is called the Type I tobit. Here the observability of the outcome depends on the values of the outcome itself - whether it crosses a non-stochastic threshold. 2) The model fitted by -heckman- is what is called the Type II tobit. Here the observability of the outcome (your "fee" variable) depends on the values of a binary indicator (probably what your "transferred" variable refers to), which is modelled using a probit regression. Conditional on the values of the binary indicator the second stage is a simple linear regression fitted by OLS - where the conditionality is taken into account using the Mills ratio. There is also the possibility of fitting the whole model in one go using partial maximum likelihood, but the important point is that the conditional model for the outcome is a linear regression, and in the two-step version of Heckman's estimator, the outcome is fitted using OLS. Lastly, note that OLS is an estimation technique and tobit is a model. T On Sat, Dec 17, 2011 at 1:16 PM, J. Boreham <jb648@cam.ac.uk> wrote:Dear Statalist,I'm very new to Stata, so apologise if this is a silly question. I'mlooking to run a Tobit regression using the Heckman correction. MyHeckman code is:***** heckman fee age agesq curr_app curr_goal_d curr_goal_mcurr_goal_f, /// select(transferred = age agesq curr_app curr_goal_dcurr_goal_m curr_goal_f prom) twostep *****But this uses OLS rather than a Tobit model. I instead attempted to create the two stage Heckman correction by first manually producing the inverse Mills ratio, and then running a Tobit regression: ***** probit transferred age agesq curr_app curr_goal_d curr_goal_m curr_goal_f prom predict predicted_values, xb generate denominator = normal(predicted_values) generate numerator = normalden(predicted_values) generate mills_ratio = numerator/denominator tobit fee age agesq curr_app curr_goal_d curr_goal_m curr_goal_f mills_ratio *****However, this will not account for the non-standard errors one needswhen using the Heckman correction.So is it possible either to tell Stata to use a Tobit regression withthe "heckman" command, or instead to get the correct standard errorswhen manually doing the correction by inserting the inverse Millsratio?Thanks for your consideration, John Boreham * * 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/

**Follow-Ups**:**Re: st: Using a Tobit regression with the Heckman correction***From:*Nick Cox <njcoxstata@gmail.com>

**References**:**st: Using a Tobit regression with the Heckman correction***From:*"J. Boreham" <jb648@cam.ac.uk>

**Re: st: Using a Tobit regression with the Heckman correction***From:*Tirthankar Chakravarty <tirthankar.chakravarty@gmail.com>

**Re: st: Using a Tobit regression with the Heckman correction***From:*"J. Boreham" <jb648@cam.ac.uk>

**Re: st: Using a Tobit regression with the Heckman correction***From:*Tirthankar Chakravarty <tirthankar.chakravarty@gmail.com>

- Prev by Date:
**Re: st: Using a Tobit regression with the Heckman correction** - Next by Date:
**Re: st: Using a Tobit regression with the Heckman correction** - Previous by thread:
**Re: st: Using a Tobit regression with the Heckman correction** - Next by thread:
**Re: st: Using a Tobit regression with the Heckman correction** - Index(es):