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

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

From |
"Norbert Wilson" <WILSONL@auburn.edu> |

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

Subject |
Re: st: conditional marginal effects after the Heckman two-step sample |

Date |
Thu, 30 Dec 2010 16:19:56 -0600 |

Vince Thank you for the clarification. Norbert Norbert L. W. Wilson, Ph.D. Auburn University Department of Agricultural Economics and Rural Sociology 100 C Comer Hall Auburn University, AL 36849 (o) 1 334 844 5616 (f) 1 334 844 3519 WilsonL@auburn.edu >>> Vince Wiggins, StataCorp <vwiggins@stata.com> 12/30/2010 2:04 PM >>> Norbert Wilson <WILSONL@auburn.edu> is having trouble getting -margins- to estimate the marginal effect of a covariate on the conditional expectation of his dependent variable -- E(y | y observed) -- after estimation using -heckman- with the -twostep- option. Norbert writes that he is typing, . margins, dydx (x) predict (ycond) and that Stata "does not recognize this command". Norbert also notes that he was able to obtain estimates of these marginal effects using -mfx-. I am not sure what "does not recognized" means, but I can see two possible problems. One, Norbert's command is not technically legal. He should remove the spaces between his option names and their associated open parentheses, . margins, dydx(x) predict(ycond) I say technically, because sometimes Stata will tolerate these spaces and sometimes it will not. Either way, they are not supported. Two, and more likely, -margins- is returning the following error after Norbert's command, predict option ycond not appropriate with margins r(322); Had Norbert fit his Heckman model using the default MLE, -margins- would have been willing to estimated the marginal effects. The reason it refuses after twostep estimation is that estimates of sigma (the root of the variance of the disturbances) and rho (the correlation between the disturbances of the model and selection equations) are required estimate the conditional expectations of the dependent variable. The twostep estimator produces estimates of these two values but does not estimate the variance of rho or the covariance of rho and sigma with the other parameters. So, the standard errors of the conditional expectations would ignore these sources of variation. These variances and covariances simply are not part of the twostep estimator. -margins- refuses to proceed, knowing that it does not have estimates of all of the sources of variation in the conditional expectations. -mfx- enforced this requirement differently. It provided point estimates, but not standard errors. When the Heckman model is fit by MLE, the variance and covariances of sigma and rho are estimated and both -margins- and -mfx- will produce point estimates and standard errors. Norbert can instruct -margins- to perform its calculations ignoring its inability to identify all sources of variation by adding the -force- option to his command. The point estimates are fine, but the SEs ignore that rho and sigma are estimated. If Norbert wishes to compare results from -margins- and -mfx-, he should add the -atmeans- option to -margins-. By default, -margins- computes average marginal effects not marginal effects at the means (or specified values). -mfx- could compute only the latter. -- Vince vwiggins@stata.com * * 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/

**Attachment:
Norbert Wilson.vcf**

**References**:**Re: st: conditional marginal effects after the Heckman two-step sample***From:*vwiggins@stata.com (Vince Wiggins, StataCorp)

- Prev by Date:
**st: new version of rct_minim available on SSC** - Next by Date:
**st: Does Stata store the name of dta files** - Previous by thread:
**Re: st: conditional marginal effects after the Heckman two-step sample** - Next by thread:
**st: new version of rct_minim available on SSC** - Index(es):