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

st: RE: log transformation question


From   "Wallace, John" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: log transformation question
Date   Thu, 17 Jun 2004 13:20:07 -0700

I think its usually a mistake to throw data away.  I'd be in favour of the
first approach, as you can do your log transformations, play with models,
etc and then project the results back onto your original number line by
reversing the math.  The second case would only make sense to apply if the
negative values were the result of goofy arithmetic where negative values
wouldn't result in reality (negative brightness, or mass for instance).
As long as negative growth makes sense (you aren't starting with a
population of zero, for example) then its perfectly reasonable to add an
offset to make logarithmic math work...just keep track of what the offset
is.
I'll leave the stat questions for the statisticians to answer!

John Wallace | Research Associate | Test Method Development
AFFYMETRIX, INC. | 3380 Central Expressway | Santa Clara, CA 95051 | Tel:
408-731-5574 | Fax: 408-481-0435


-----Original Message-----
From: [email protected] [mailto:[email protected]] 
Sent: Thursday, June 17, 2004 10:50 AM
To: [email protected]
Subject: st: log transformation question

2 questions:

** 1 **
i am transforming a bunch of variables into their natural logs, and i 
have read conflicting advice on how to treat the negative values, such 
as growth, which ranges from -99 to +300 in my dataset.

one website suggests i just add +100 to the variable and then log it

gen log_growth = ln(growth+100)

a second website i visited suggests turning all negative values into 0

gen log_growth = ln(growth)
(75 missing values generated)

recode log_growth .=0

** 2 **

once i get all my variables into the appropriate log form, what is the 
difference between using regress and cloglog, because they give me 
different results.

thank you!
matt


*
*   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/
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index