Statalist


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

R: st: R: Log of nonpositive numbers


From   "Carlo Lazzaro" <carlo.lazzaro@tin.it>
To   <statalist@hsphsun2.harvard.edu>
Subject   R: st: R: Log of nonpositive numbers
Date   Wed, 2 Jul 2008 12:22:30 +0200

Viktor wrote:
dear stata listers,
I want to estimate production function in logs in order to interpret the
coefficients in terms of elasticities. one of the RHS variables has a lot of
zero value. in such cases, some people usually add a very small value in
order to avoid the problem of 'undefined' log of zero. a similar issue was
discussed some time ago among other things and in a quite different context
but an interesting alternative suggestion was made (which I can't remember
anymore). unfortunately, I was not able to find this particular thread.
in that sence, any suggestions how to deal with the problem would be greatly
appreciated thanks a lot viktor

Dear Viktor,
Please find below the debate you mentioned on a similar question.
Austin's advice outperformed the others (mine too!!).
Kind Regards,
Carlo
-----Messaggio originale-----
Da: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Per conto di Austin Nichols
Inviato: domenica 30 marzo 2008 5.09
A: statalist@hsphsun2.harvard.edu
Oggetto: Re: st: R: Log of nonpositive numbers

No, it would not be okay.  You might instead pick an alternative
transformation that is similar to the log but allows for nonpositive
arguments.
  ssc inst transint
  help transint
has a useful discussion of alternatives.

On Sat, Mar 29, 2008 at 4:59 PM, ucb_gal <ucb_gal@yahoo.com> wrote:
> With regards to the wealth variable, I have a number of cases that are
substantially negative (with net worth less than negative $50k).  Would
adding a constant as large at 100k be OK?
>
>
>
>  ----- Original Message ----
>  From: Carlo Lazzaro <carlo.lazzaro@tin.it>
>  To: statalist@hsphsun2.harvard.edu
>  Sent: Saturday, March 29, 2008 1:45:56 AM
>  Subject: st: R: Log of nonpositive numbers
>
>  Dear Ucb_gal,
>
>  a tempative answer might be to add a little constant to your zeros, in
order
>  to make natural log transformation feasible. However, this trick will
give
>  you back <0 values.
>
>  Kind Regards,
>
>  Carlo
>
>  -----Messaggio originale-----
>  Da: owner-statalist@hsphsun2.harvard.edu
>  [mailto:owner-statalist@hsphsun2.harvard.edu] Per conto di ucb_gal
>  Inviato: sabato 29 marzo 2008 6.57
>  A: statalist@hsphsun2.harvard.edu
>  Oggetto: st: Log of nonpositive numbers
>
>  Hi,
>
>  I've seen this question asked a few other times, but I'm still a little
>  unclear on what the considerations are in thinking this through.
>
>  I'm running logistic regressions with the log of income and wealth as
>  independent variables.  I've seen this done often enough that I didn't
>  really think twice about it.  But then I realized that while I don't have
a
>  ton of cases with exact 0 values in either variable, I do have a number
of
>  cases with negative wealth.  And all of these show up as missing now.
>
>  Am I mistaken in thinking that I've seen studies that use the log of
income
>  as predictors??
>
>  Thanks!
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index