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: Bug or Feature


From   "Jacobs, David" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: Bug or Feature
Date   Mon, 3 Feb 2014 19:13:32 +0000

Dear Stata List:

When I try to use -margins- and -marginsplot- to plot a quadratic relationship in a pooled time-series model estimated with -xtreg, fe-, if there are additional quadratic or interaction effects in the fixed-effects model calculated in a way that margins can understand (by using the "##" or the "#" approach), Stata almost always complains that margins are "not estimable".  One inconvenient work around that sometimes produces margin results involves generating separate squared variables or interaction product terms for the relationships that I don't want graphed.  This awkward method avoids the "##" protocol for all other coefficients.  When only one "##" term remains in a model, margins often (but not always) will estimate the predictions from a -xtreg, fe- model.  I should add that a good part of the time but not as often margins also gives the same "not estimable" result if I use the Stata -areg- fixed-effects command again as long as there's more than one "##" specificatio!
 n in a model.

I recently found a less inconvenient work around that employs -regress- to calculate the fixed-effects point estimates.  If I enter separate dummies for each case in a regression model otherwise identical to the -xtreg, fe- model (which, of course, is another way to estimate fixed-effects coefficients), margins always has provided these predictive values even if many additional quadratic or interactive relationships calculated with the ## approach remain in the regression model (the standard errors in such regressions won't be identical to those estimated by -xtreg, fe-, but that shouldn't affect the graph, although the confidence intervals-which I typically don't report-probably will be a bit off).  

Does anyone know why margins won't provide results for -xtreg, fe- or probably -areg- models when many terms are calculated with the ## protocol, yet margins works properly when the same models are estimated with -regress-?

Dave Jacobs

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index