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: Clarification requested about the at() option of -margins-


From   Trevor Zink <tzink@bren.ucsb.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Clarification requested about the at() option of -margins-
Date   Wed, 23 Oct 2013 23:21:13 -0700

Long-time lurker, first-time post. I couldn't find a good explanation in the archives.

I'm confused about what, specifically, -margins- is doing with the at() option, such that it can calculate margins for values of variable that don't exist in the data. To articulate with an example:

sysuse auto
summarize weight //maximum weight is 4840
logit foreign weight  //nonsensical, but ok for the example
margins, dydx(weight) at(weight=(0(1000)10000 100000))

Here I ask for the slope of the function at a variety of weights from 0 to 10,000 and also 100,000. The maximum weight observed in the data is 4840.

My understanding of -margins- with at() was that it calculates the slope of the function holding the specified variables constant at the specified levels. But if the specified level doesn't appear in the data, how can Stata determine what the slope is at this value? Ok, it's clearly extrapolating, but based on what information? The only other information included in the above model is a constant. When I try the above but specifying the nocons option to -logit- Stata returns an error, so it must be forecasting based on the constant; but specifically how?

What's even more strange to me is that the standard errors *shrink* as the estimates extend beyond the observed data. If Stata is forecasting based on only the constant this seems counter-intuitive to me.

Thanks, and sorry if this is silly.

Trevor Zink

*
*   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