Statalist


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

st: Creating a variable taking the value of elasticity


From   Dorothy Bridges <[email protected]>
To   [email protected]
Subject   st: Creating a variable taking the value of elasticity
Date   Tue, 8 Sep 2009 09:55:14 -0400

Dear Statalist,

I have a simple dataset containing two variables, x and y.  I regress
ln(y) on ln(x) and observe the coefficient on x as elasticity.  I then
want to create a variable taking the value of this coefficient.  How
would I do this?  Something like local elas=e(b); gen elas=`elas',
except e(b) contains all the coefficients, and I just want one.

A related question: when I regress y on x and then input "mfx, eyex,"
the ey/ex value is not the same as the coefficient I obtain using
regress ln(y) ln(x).  Why?  Also: how would I extract the ey/ex value
from the mfx output in order to create a variable taking that value?

Thank you,
Dorothy

*
*   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/



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