0
$\begingroup$

My data is like this:

person   final   sex
1        34.20    1
2        2.00     0
3        15.58    0
4        18.00    1
5        50.06    1

I am fitting po = glm (final ~ sex, data=df, family="poisson"), there are warnings because "final" is not a integer. Final is a count of risky behaviours. What can I do to fix this issue?

$\endgroup$
3
  • 3
    $\begingroup$ What does it mean when the count of risky behaviors is non-integer, such as 34.2? $\endgroup$
    – John Paul
    Commented Mar 3, 2015 at 21:00
  • $\begingroup$ No transformation. Either your data are suitable as they come, or you should use a different method. $\endgroup$
    – Nick Cox
    Commented Mar 3, 2015 at 22:09
  • $\begingroup$ When I count things I only get integers; if I get non-integer values like 50.06 I did something other than just counting. Can you explain how it happens that none of your counts are integers? Are they averages of counts, for example? Are they rates per unit time? Why would you choose to model what are clearly not counts as Poisson? The manner in which these non-integral values arise will be important to suitable approaches to the issue. $\endgroup$
    – Glen_b
    Commented Mar 4, 2015 at 1:08

1 Answer 1

3
$\begingroup$

When performing Poisson regression, it is assumed that the response variable (in your case, final) is an integer, as the goal of Poisson regression is to model count data. In this case, a transformation would not be the appropriate solution-- my suggestion is to check how you arrived at the values for final. If final represents counts of risky behaviors it should be composed of all integers.

$\endgroup$
3
  • 3
    $\begingroup$ Say rather that many implementations assume and enforce this. Others are happy to be more generous. The fact the the normal is a limiting case of the Poisson is one illustration of the idea that it's often not outrageous to regard the Poisson as approximately continuous. Similarly in data analysis many implementations are broader-minded and to good effect. See e.g. blog.stata.com/2011/08/22/… and its references. Arguably, being Poisson even conditionally is no more central to Poisson regression than being Gaussian is to linear regression. $\endgroup$
    – Nick Cox
    Commented Mar 3, 2015 at 21:47
  • 2
    $\begingroup$ @Nick You're correct--I've read and appreciated that blog post before. I sympathize with Ben F's answer here, though (+1), because he rightly points out that those warning messages raise a huge flag: although (in the hands of an expert who will know enough to anticipate and ignore such warnings) Poisson regression with non-integral data can be meaningful, very likely what it indicates is the wrong procedure has been selected or that the data have been incorrectly coded. $\endgroup$
    – whuber
    Commented Mar 3, 2015 at 21:59
  • 1
    $\begingroup$ @whuber Agreed. The detailed questions about the OP's data remain and the widespread usefulness of Poisson regression does not imply that it is a good choice for his data. $\endgroup$
    – Nick Cox
    Commented Mar 3, 2015 at 22:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.