Statalist


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

AW: st: AW: AW: Creating a variable taking the value of elasticity


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   AW: st: AW: AW: Creating a variable taking the value of elasticity
Date   Tue, 8 Sep 2009 16:22:58 +0200

<> 

" Does x or y contain values that are 0 or less?"


In the case below, this seems not to be the problem...


*************
vers 10.1

sysuse auto, clear

//no zeroes in est sample
su mpg length turn

qui{
	gen logmpg=log(mpg)
	gen loglength=log(len)
	gen logturn=log(turn)
}

reg mpg length turn
mfx, eyex

reg logmpg loglength  /* 
*/ logturn, noheader
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von Maarten buis
Gesendet: Dienstag, 8. September 2009 16:21
An: [email protected]
Betreff: Re: st: AW: AW: Creating a variable taking the value of elasticity

--- On Tue, 8/9/09, Dorothy Bridges wrote:
> But what I don't understand is: the second method 
> (using mfx, eyex) gives me a different value than
> the first method (storing the coefficient on x
> from *regress lny lnx*).  Why?

Does x or y contain values that are 0 or less? In 
that case you are creating missing values by 
creating lnx and/or lny. 

-- Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

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


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