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]

From |
Austin Nichols <[email protected]> |

To |
"[email protected]" <[email protected]> |

Subject |
Re: st: puzzling semi-elasticity from margins |

Date |
Thu, 16 Jan 2014 14:41:17 -0500 |

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/

**Follow-Ups**:**Re: st: puzzling semi-elasticity from margins***From:*"Dimitriy V. Masterov" <[email protected]>

**References**:**st: puzzling semi-elasticity from margins***From:*"Dimitriy V. Masterov" <[email protected]>

- Prev by Date:
**Re: st: looping through variables that are not consecutive and have common stem in name** - Next by Date:
**Re: st: puzzling semi-elasticity from margins** - Previous by thread:
**st: puzzling semi-elasticity from margins** - Next by thread:
**Re: st: puzzling semi-elasticity from margins** - Index(es):