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

Re: st: margins and interactions

From   [email protected] (Jeff Pitblado, StataCorp LP)
To   [email protected]
Subject   Re: st: margins and interactions
Date   Tue, 01 Sep 2009 14:40:12 -0500

Ed Levitas <[email protected]> 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

[email protected]
*   For searches and help try:

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