Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: When to use Log (1+x) Transformation?


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: When to use Log (1+x) Transformation?
Date   Sat, 5 Apr 2008 19:26:41 +0100 (BST)

--- Song <raravise@gmail.com> wrote:
> I need to use log transformation before regression analysis. Because
> some of my variables contain 0, I need to use log (1+x) instead of
> log (x), where x contains only positive values. My question is... Do
> I need to use log (1+x) if x does not contain 0, but contains values
> less than one? I think I can  use log (x) in this case.

This question comes up so every once in a while, and the answer is
always that you should not do the log(1+x) transformation at all. If
the variable is your dependent variable you can avoid doing that by
using -glm- with the -link(log)- option. If your variable is an
independent variable, the concern is linearity of the effect of that
variable, so you can work around that by entering it as a spline. See:
-help glm- and -help mkspline-.

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      ___________________________________________________________ 
Yahoo! For Good helps you make a difference  

http://uk.promotions.yahoo.com/forgood/
*
*   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