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

Re: st: Handling 0 values when using logs of a dependent variable

From   Austin Nichols <>
Subject   Re: st: Handling 0 values when using logs of a dependent variable
Date   Wed, 15 Jul 2009 10:43:43 -0400

Dana Chandler<> :
The log of zero is missing for a reason, as the quantity is undefined.
You should ignore the advice of anyone who suggests replacing the
zeros with ones before taking logs, which is demonstrably wrong, as is
the sometimes used strategy of replacing the zeros with a value (call
it u) smaller than any observed positive value, taking logs, then
applying -tobit- with a lower limit at ln(u). OTOH, -poisson- or -glm-
with a log link regressing y on x will give you results comparable to
regressing ln(y) on x and includes the y=0 cases in a natural way.
Make sure you use robust SEs and see also the help file for -ivpois-
on SSC.

On Wed, Jul 15, 2009 at 9:17 AM, Dana Chandler<> wrote:
> I would like to run a regression of a given variable's log on another
> set of variables. How should I handle the 0 values?
> I have searched for an answer and saw some people say that "you cannot
> run a regression with logs on values of zero... those values should be
> considered 'missing' in the regression." Another suggestion was to
> replace the 0s with 1s.
> Any thoughts?
> Thanks in advance,
> Dana
*   For searches and help try:

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