Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: 2 elasticity questions


From   "Scott Merryman" <merryman@icehouse.net>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: 2 elasticity questions
Date   Sat, 20 Jul 2002 18:49:40 -0600

----- Original Message -----
From: "Botelho, Delane" <delane.botelho@marshall.usc.edu>

> I ran "xtlogit" (random effect) and "mfx compute, eyex" to get the
> elasticities. Then I calculated the same elasticities using "predict var,
> pu0" and plugging in the formula of elasticities of logit (p. 111
Ben-Akiva
> & Lerman). Fortunately I got the same results, and I understood what STATA
> did.

Is this possible?  When I try "mfx compute, eyex" after xtlogit, re I get "
eyex not available"

Example, from [R] xtlogit page 380

. use http://www.stata-press.com/data/r7/union.dta
(NLS Women 14-24 in 1968)

. qui xtlogit union age grade not south southXt, i(id) re

. mfx compute, eyex
y=__0004OV< 0, eyex not available
r(459);

I believe you would want to use mfx compute, predict(pu0) in this case.

. mfx compute, predict(pu0) nose

Marginal effects after xtlogit
      y  = Pr(union=1 assuming u_i=0) (predict, pu0)
         =  .08693276
----------------------------------------------------------------------------
---
                        variable |          dy/dx                 X
---------------------------------+------------------------------------------
---
                             age |        .0007334            30.4322
                           grade |        .0066681            12.7615
                        not_smsa*|       -.0195416            .283702
                           south*|       -.0867433            .413015
                         southXt |        .0018886            3.96874
----------------------------------------------------------------------------
---
(*) dy/dx is for discrete change of dummy variable from 0 to 1


> Then, I ran "regress" (another dataset, different variables), using
natural
> logs of quantity (depvar) and price (varlist). The coefficient of price is
> supposed to be the elasticity. But when I ran "regress" not using natural
> logs, and afterwards "mfx compute, eyex", those elasticities are not the
> same as the coefficients in the first regression.

If your model is already in double log form than the coefficients are the
marginal effects.  Or if you want to use mfx compute, than it should be mfx
compute, dydx.

Alternatively, if you model was in levels than you would want to use mfx
compute , eyex.

Example

. use "C:\Stata\auto.dta", clear
(1978 Automobile Data)

. gen lnprice = ln(price)
. gen lnmpg = ln(mpg)
. reg lnprice lnmpg , nohead
----------------------------------------------------------------------------
--
     lnprice |      Coef.   Std. Err.      t    P>|t|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
       lnmpg |   -.826847   .1484986    -5.57
0.000    -1.122873   -.5308204
       _cons |   11.14146   .4507755    24.72   0.000     10.24286
12.04007
----------------------------------------------------------------------------
--

. reg price mpg , nohead
----------------------------------------------------------------------------
--
       price |      Coef.   Std. Err.      t    P>|t|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
         mpg |  -238.8943   53.07669    -4.50
0.000    -344.7008   -133.0879
       _cons |   11253.06   1170.813     9.61   0.000     8919.088
13587.03
----------------------------------------------------------------------------
--

. mfx compute, eyex nose

Elasticities after regress
      y  = Fitted values (predict)
         =  6165.2568
----------------------------------------------------------------------------
---
                        variable |          ey/ex                 X
---------------------------------+------------------------------------------
---
                             mpg |        -.825238            21.2973
----------------------------------------------------------------------------
---


> 2. I also need to run Poisson regression and calculate elasticities. If I
> use "mfx compute, eyex" after "poisson", how (which formula) STATA will
> calculate the elasticity?
>
> Please, give at least some reference.

J. Scott Long and Jeremy Freese in "Regression Models for Categorical
Dependent Variables Using Stata" use 'mfx, compute' in their example of
calculating marginal change after poisson, pages 234 -235.

Scott Merryman




*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index