Bookmark and Share

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, is already up and running.

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

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

From   "Norbert Wilson" <>
To   <>
Subject   Re: st: conditional marginal effects after the Heckman two-step sample
Date   Thu, 30 Dec 2010 16:19:56 -0600


Thank you for the clarification.


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

>>> Vince Wiggins, StataCorp <> 12/30/2010 2:04 PM
Norbert Wilson <> is having trouble getting -margins-
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

    . 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
problems.  One,  Norbert's command is not technically legal.  He should
the spaces between his option names and their associated open

    . margins, dydx(x) predict(ycond)

I say technically, because sometimes Stata will tolerate these spaces
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

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
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,
standard errors of the conditional expectations would ignore these
sources of
variation.  These variances and covariances simply are not part of the
estimator.  -margins- refuses to proceed, knowing that it does not
estimates of all of the sources of variation in the conditional

-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
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
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
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
marginal effects not marginal effects at the means (or specified
-mfx- could compute only the latter.

-- Vince 

*   For searches and help try:

Attachment: Norbert Wilson.vcf
Description: Binary data

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index