0

I'm trying to fit a linear regression on a Poisson like outcome (lots of 0's and 1's and other integers) and currently trying to create log(y). However, R will return a list of numbers with lots of -Inf (log(0) = -inf).

I'm wondering how would make this model work by transforming the outcome variable (i.e. how other Poisson outcome linear regression models were fit)?

Please don't tell me that I should use a Poisson regression since I am. I'm trying to fit different models on the data and finding out which model performs the best.

TYZ
  • 775
  • I think that you're a little bit confused and flustered. I recommend taking some time away from your project to catch your breath. Once you get back, look up the poisson distribution -- it is defined on all non-negative integers. If you have 0/1 data, its binomial, rather than poisson. Consider reformulating your question to contain enough information for someone who knows nothing about your context to possibly help you. – generic_user Sep 28 '15 at 23:12
  • Are you getting at a glm with a poisson distribution but an identity link? – Matthew Drury Sep 28 '15 at 23:27
  • @generic_user I just said there are lots of 0's and 1's but also there are other numbers and I know how the distribution looks like. Just don't know how to log transform the outcome variable. – TYZ Sep 28 '15 at 23:46
  • @MatthewDrury One of the models is glm with poisson + log link but I didn't try the identity link, what is that for? – TYZ Sep 28 '15 at 23:46
  • It's an uncommon model, and I'm not sure if it's really for anything. I'm just trying to clarify what it is you're after, since you rejected classical poisson regression with a log link. – Matthew Drury Sep 28 '15 at 23:50
  • A moment's thought reveals why it is uncommon... it clearly violates positivity of poisson samples. – Matthew Drury Sep 28 '15 at 23:53
  • @MatthewDrury I didn't reject that, I'm fitting that model as well, log transformed linear regression is just another possibilities. I'm trying to study the fit of different models on this type of data. – TYZ Sep 28 '15 at 23:55
  • Poisson regression does NOT mean "take Poisson data and transform it and then fit linear regression". 2. If your data can only be 0 or 1, that's suggesting a Bernoulli model, not a Poisson one.
  • – Glen_b Sep 29 '15 at 02:56
  • @Glen_b I didn't say the data is only 0 or 1, I just said there are lots of 0 and 1's but also large integers..... – TYZ Sep 29 '15 at 14:45
  • In your original post it wasn't clear whether there was anything other than 0 or 1, which is why I said "If..." in my second point there; thanks for clarifying. – Glen_b Sep 29 '15 at 18:26
  • have a look at this: https://stats.stackexchange.com/questions/142338/goodness-of-fit-and-which-model-to-choose-linear-regression-or-poisson/142353#142353 – kjetil b halvorsen Jun 09 '17 at 22:11