[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
jpitblado@stata.com (Jeff Pitblado, StataCorp LP) |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: margins and interactions |

Date |
Tue, 01 Sep 2009 14:40:12 -0500 |

Ed Levitas <levitas@uwm.edu> is using -xtreg- with a linear and squared term for a continuous independent variable in his model, and is trying to compute elasticities using the -margins- postestimation command: > I apologize for the simplicity of this question but I can't seem to > solve a problem. > > I am trying to compute elasticities of variables in a regression model > (using xtreg,fe). The model includes a squared term (iv2 squared). > > My simplified model is: > > xtreg dv iv1 c.iv2##c.iv2. > > I've tried a number of variants of the margins command (e.g. "margins, > eyex(iv1 c.iv2##c.iv2)") but I continually receive errors. > > Can someone point me to a reference or provide suggestions about the > correct syntax for the margins command? Using the above simplified mode, it appears that Ed wants . margins, eyex(iv1 iv2) Ed can use the '*' shortcut to compute the average elasticity for each indepvar in the model . margins, eyex(*) The following will compute the elasticities where all the indepvars have been set to their mean . margins, eyex(*) atmeans --Jeff jpitblado@stata.com * * 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/

- Prev by Date:
**Re: st: Survival analysis** - Next by Date:
**Re: st: Survival analysis** - Previous by thread:
**st: margins and interactions** - Next by thread:
**Re: st: margins and interactions** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |