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]

Re: st: puzzling semi-elasticity from margins


From   "Dimitriy V. Masterov" <[email protected]>
To   Statalist <[email protected]>
Subject   Re: st: puzzling semi-elasticity from margins
Date   Thu, 16 Jan 2014 11:53:41 -0800

Austin,

That makes perfect sense. Thanks once again!

DVM

On Thu, Jan 16, 2014 at 11:41 AM, Austin Nichols
<[email protected]> wrote:
> Dimitriy V. Masterov <[email protected]>:
> You can't really assess dy/dx because your regression is not a model
> of how y changes with x but how the conditional mean of y changes with
> x.  So you can assess
> dE[y|x]/dx
> assuming you have a good model of the conditional mean in your
> regression.  Then the semielasticity eydx would be
> dE[y|x]/dx * (1/E[y|x]).
>
> Make sense?
>
> On Thu, Jan 16, 2014 at 2:01 PM, Dimitriy V. Masterov
> <[email protected]> wrote:
>> I was under the impression that eydx corresponds to (dy/dx)*(1/y).
>> There's an example of on p. 1169 of the Stata 13 manual where for obs
>> 5, dy/dx = 0.5, y = 15, and x = 30, so eydx is 0.0333333. My
>> assumption was that margins with this option would calculate the
>> average over all the observations. That does not seem to be the case
>> in this simple example:
>>
>> sysuse auto
>> reg price mpg
>> margins, eydx(*)
>> gen double me = _b[mpg]*(1/price)
>> sum me
>> predict phat, xb
>> gen double me2 = _b[mpg]*(1/phat)
>> sum me2
>>
>> margins, eydx gives  -.0421593.
>> sum me gives -.0451027
>> sum me2 yields -.0421593
>>
>> The version where I divide by the predicted price rather than the
>> actual price for each observation seems to match the margins output.
>> What am I missing here?
> *
> *   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/
*
*   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