|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: margins and interactions
Ed Levitas <[email protected]> had a follow-up question about -margins-:
> Thanks for the response. So technically I can get the elasticity of the
> "main" iv2 effect but not the effect decomposed into iv2-squared and
> iv2-residual?
Short answer:
Yes.
-margins- produces marginal effects and elasticities for individual variables
in the dataset that were used as independent variables in the model fit.
Long answer:
Here is the break-down for what the marginal effects and elasticities options
mean in the -margins- command:
option definition simplification
---------------------------------------------------------------------
dydx() dy/dx
eyex() d ln(y)/d ln(x) dy/dx * (x/y)
eydx() d ln(y)/dx dy/dx * (1/y)
dyex() dy/d ln(x) dy/dx * (x)
where 'y' denotes the user specified prediction, and 'x' is an indepvar. By
'indepvar' I mean a single variable in the Stata dataset used to fit the
model.
As mentioned in the 'Expression derivatives as elasticities' subsection in the
'Remarks' section of '[R] margins',
eyex() is the proportional change in y for a proportional change in x
If 'x' appears in the model multiple times, as in Ed's orignal example
. xtreg dv iv1 c.iv2##c.iv2
which is a shortcut for
. xtreg dv iv1 iv2 c.iv2#c.iv2
then
. margins, eyex(iv2)
will compute the average of the proportional changes in the linear prediction
for proportional changes in 'iv2'.
-margins- is aware that 'iv2' is present in both linear and squared terms in
this model and computes the derivatives with respect to the variable 'iv2'.
--Jeff
[email protected]
*
* 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/