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

From |
Rich Steinberg <rsteinbe@iupui.edu> |

To |
statalist@hsphsun2.harvard.edu |

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

Date |
Wed, 15 Jul 2009 12:38:02 -0400 |

Austin Nichols wrote:

Dana Chandler<dchandler@gmail.com> : 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<dchandler@gmail.com> 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: * 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/

**Follow-Ups**:**Re: st: Handling 0 values when using logs of a dependent variable***From:*Austin Nichols <austinnichols@gmail.com>

**References**:**st: Handling 0 values when using logs of a dependent variable***From:*Dana Chandler <dchandler@gmail.com>

**Re: st: Handling 0 values when using logs of a dependent variable***From:*Austin Nichols <austinnichols@gmail.com>

- Prev by Date:
**st: RE: Out of Office notifications** - Next by Date:
**RE: st: machado mata stata** - Previous by thread:
**Re: st: Handling 0 values when using logs of a dependent variable** - Next by thread:
**Re: st: Handling 0 values when using logs of a dependent variable** - Index(es):

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