Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: a way to calculate marginal products of transformed variables in post-estimation


From   Megan Sheahan <megan.sheahan@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: a way to calculate marginal products of transformed variables in post-estimation
Date   Sun, 4 Nov 2012 12:16:52 -0500

Hello,

I am running a regression which includes a number of variables that
have been transformed to logs. For example:

variable name lN_ha = log(N_ha)

Both the y and continuous x variables in my model are in log form. In
post estimation, I would like to recover the marginal products of
N_ha. Using the margins command, however, Stata provides elasticities,
not the marginal products. Is there a way to tell Stata that (1) your
variables are transformed so that it can provide the true marginal
products of the log transformed variable automatically and/or (2) NOT
transform the variables into a new variable but tell Stata that you
want the variable as a log in the regression (e.g., like using L. for
lagged variables or i. for categorical variables).

For reference, here is the syntax for the regression I am running.

regress lyield_ha c.lN_ha#i(1 2 3)zone_comb c.lN_ha#c.lN_ha#i(1 2
3).zone_comb c.lN_ha#c.lP_ha#i(1 2 3).zone_comb c.lN_ha#i(1 2
3).soil_group_megan c.lN_ha#c.lrain_stress#i(1 2 3).zone_comb lseed_ha
c.lseed_ha#c.lseed_ha lhectares c.lhectares#c.lhectares lmasset_ha
c.lmasset_ha#c.lmasset_ha lrain_stress i.manure i.hybrid
c.lrain_stress#hybrid i.legume i.crop_per_field i.dist i.FAO_class
i.year, cluster(hhid)

Many thanks in advance for your suggestions.

All the best,
Megan
*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index