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

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

From   Maarten buis <>
Subject   Re: st: When to use Log (1+x) Transformation?
Date   Sat, 5 Apr 2008 19:26:41 +0100 (BST)

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

Yahoo! For Good helps you make a difference
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index