Bookmark and Share

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]

st: Error with ystar margins after svy, subpop(): tobit


From   Ryan Edwards <[email protected]>
To   <[email protected]>
Subject   st: Error with ystar margins after svy, subpop(): tobit
Date   Thu, 10 Mar 2011 18:57:39 -0500

Here's the setup:

o  fully updated StataMP v.11.1
o  svyset national repeated cross sectional data with state-level clustering and pweight
o  time-use data that is heavily heaped at zeros, so I need a tobit or something similar
o  interesting differences in responses to covariates across age/sex subgroups, so I need subpop()

I want to run:

. svy, subpop(subgroup1): tobit y x1 x2 x3, ll(0)
. margins, dydx(x1) predict(ystar(0,.))

That is, I want to transform the tobit's coefficient estimates (the beta's) into marginal effects on the observed (truncated) variable, ystar.  But when I do this on some (but not all) of the subgroups, Stata won't comply, and tells me:

missing predicted values encountered within the estimation sample
r(322);

If I break the cardinal rule of svy estimation and use an "if" or just drop all obs outside subgroup1, then Stata will happily return a marginal effect on ystar, but the standard errors in those estimations are indeed different than in the subpop estimation, as the Stata documentation warns.

The error seems to be specific to tobit with svy with subpop when asking for the ystar marginal effect.  Asking for the regular margins dydx works, which stands to reason since it's just regurgitating the regression output.  The problem also goes away, e.g., if I run svy-subpop-reg or plain old tobit-if without svy.  It also isn't an issue when running svy-subpop-probit on the very same data, probably because there's no ystar analog.

I see a similar error if, after the svy subpop tobit, I instead ask for the outdated

. mfx compute, predict(ystar(0,.))

For the x1 in question, Stata returns a "." as the marginal effect on ystar, although there is no formal error message.

Any thoughts?  A workaround might be just to transform manually the beta's into marginal effects by multiplying by the fitted probability of nonzero ystar at the mean of the x's (if I get my tobit math right).

Ryan Edwards
Assistant Professor of Economics
Queens College and the Graduate Center
City University of New York
[email protected]
GC tel: 212-817-8273
QC tel: 718-997-5189
QC fax: 718-997-5466
http://qcpages.qc.cuny.edu/~redwards/


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index