0

I have an outcome variable 'expenditure' which I believe may be non-linear in nature so I am running a log-linear regression after taking log of the variable. However, there are values under expenditure that are 0 and those are transformed into missing values, which of course makes sense since you cannot take a log of 0.

However, I am not sure how to proceed with my regression as it would be incorrect of me to allow these values to be missing values as they aren't missing, the expenditure is just 0.

What would be the best way to proceed in this situation? I have seen that perhaps I could do a log(x+1) transformation? Could I add maybe the tiiiniest amount to the 0 value so the expenditure is still essentially 0 but not quite which would still allow me to do a log transformation? or perhaps another, better solution?

Nikita
  • 3
  • 2
  • 1
    Cross-posted at https://www.statalist.org/forums/forum/general-stata-discussion/general/1652890-taking-log-of-var-turning-0-into-missing-value where there is already some discussion. – Nick Cox Mar 04 '22 at 12:32
  • The problem with the "tiniest amount" is that there is no such thing. Consider that log 10 of 1/billion is -9 and of 1/trillion is -12 and so on, so the road to perdition there is mapping zeros to massively negative outliers. – Nick Cox Mar 04 '22 at 12:40
  • You have many options. See the hits for [this site search for related questions](https://stats.stackexchange.com/search?q=log+regression+0+-logistic+score%3A5). – whuber Mar 04 '22 at 14:21

0 Answers0