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: Marginal effects with natural log of independent variable


From   Misha Spisok <misha.spisok@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Marginal effects with natural log of independent variable
Date   Thu, 4 Mar 2010 22:43:11 -0800

Hello, Statalist!

I'm still trying to conquer the basic model (i.e., conditional logit)
in ml, but I've been thinking about subsequent problems (er,
challenges...) down the line.  Foremost on my mind are marginal
effects.  Note that "_ij" is "subscript i,j."

The basic issue is marginal effects when the independent variable is x
vs. ln(x) (i.e., untransformed vs. transformed).

If my model is

p_ij = e^b*x_ij/[sum e^b*x_ik]            (1)

then the marginal effect, dp/dx_ij, differs by observation and average
marginal effects are calculated.

The marginal effect can be shown to be

dp_ij/dx_ij = b*p_ij*(1-p_ij)

Is it kosher to do the following if the independent variable is the
natural log of the "original" (i.e., untransformed) independent
variable?  For example, let the model be

p_ij = e^b*ln(x_ij)/[sum e^b*ln(x_ik)].          (2)

Now the marginal effect, with respect to the untransformed variable ought to be

dp_ij/dx_ij = (b/x_ij)*p_ij*(1 - p_ij)

Now, the elasticity of p with respect to x_ij in (1) is

epsilon = (dp_ij/dx_ij)*(x_ij/p_ij) = (marginal effect)*(x_ij/p_ij) =
[b*p_ij*(1 - p_ij)]*(x_ij/p_ij) = b*(1 - p_ij)*x_ij,

while for (2) it is

epsilon = (dp_ij/dx_ij)*(x_ij/p_ij) = (marginal effect)*(x_ij/p_ij) =
[(b/x_ij)*p_ij*(1 - p_ij)]*(x_ij/p_ij) = b*(1 - p_ij)

One benefit I see is that the variable, x_ij, doesn't appear in this
expression.

Thanks for taking the time to read this, not to mention for any help
or suggestions.

Cheers,

Misha
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index