1
$\begingroup$

I have the following problem. I am trying to use the poisson regression on my data, which look like this:

Year   Resistance.proportion
1990            0.367
1991            0.678
1992            0.786

I am using the following code in R to do the modeling:

> model <- glm(Resistance.proportion ~ Year, data=sulfodf_for_poisson_r, family = poisson(link=log))

After executing the command, I get the following message in R:

Warning messages:
1: In dpois(y, mu, log = TRUE) : non-integer x = 0.362069
2: In dpois(y, mu, log = TRUE) : non-integer x = 0.375000
3: In dpois(y, mu, log = TRUE) : non-integer x = 0.723684
4: In dpois(y, mu, log = TRUE) : non-integer x = 0.458333
5: In dpois(y, mu, log = TRUE) : non-integer x = 0.595238
6: In dpois(y, mu, log = TRUE) : non-integer x = 0.666667
7: In dpois(y, mu, log = TRUE) : non-integer x = 0.875000
8: In dpois(y, mu, log = TRUE) : non-integer x = 0.583333
9: In dpois(y, mu, log = TRUE) : non-integer x = 0.321429
10: In dpois(y, mu, log = TRUE) : non-integer x = 0.933333

Is the problem here really that the numbers are floats and have to be integers or is there something more subtle? Furthermore, if I summarize the model, I get an AIC that is infinite, which is also a bad thing as I understood.

I have looked through several questions as Fitting a Poisson GLM in R - issues with rates vs. counts, but they do not provide an helpful answer to me.

So my questions are:

1.)Why am I getting these errors and how can I resolve them?

2.) Once the model is correct, what is a good way to graphically represent it?

$\endgroup$
  • 3
    $\begingroup$ Your title says 'count data' but the example data seems to contain proportions rather than counts $\endgroup$ – Juho Kokkala Apr 4 '16 at 11:36
  • 2
    $\begingroup$ You could try beta regression instead of Poisson. $\endgroup$ – Peter Flom Apr 4 '16 at 11:42
  • $\begingroup$ Oh man...that was a pretty stupid error. yes, transformed the count data into proportions. $\endgroup$ – sequence_hard Apr 4 '16 at 11:44
  • $\begingroup$ @PeterFlom thanks, i will read up on beta-regression! $\endgroup$ – sequence_hard Apr 4 '16 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.