1
$\begingroup$

I am dealing with a dependent variable that is either 0, 1 or 2 in theory it is unbounded and it can take values more than 2 so I am motivated to test Poisson model first.

The frequency counts for these outcomes, 0, 1 or 2 is as follows

  Var1   Freq
  0      433301
  1      989
  2      10

The mean, turns out to be 0.002323279 , mean <- sum(tempdf3$pi*as.numeric(as.character(tempdf3$Var1))) ; mean <- round(mean,0) ; mean

The standard deviation is 0.04867576, sqrt(sum(((as.numeric(as.character(tempdf3$Var1)) - mean)^2)*tempdf3$pi))

If i round the mean and standard deviation, mean <- round(mean,0), and standard deviation stdD <- round(stdD,0)both are 0

So is it safe to try Poisson regression on this dataset, since both the mean and variance are the same ?

tempdf3 <- structure(list(Var1 = structure(1:3, .Label = c("0", "1", "2"
), class = "factor"), Freq = c(433301L, 989L, 10L), pi = c(0.997699746718858, 
0.00227722772277228, 0.0000230255583697905)), .Names = c("Var1", 
"Freq", "pi"), row.names = c(NA, -3L), class = "data.frame")
$\endgroup$
  • 2
    $\begingroup$ It's not clear to me why you think rounding two different numbers off to 0 means they are actually the same. $\endgroup$ – jbowman Aug 26 '18 at 16:59
  • $\begingroup$ @jbowman, Good question, I am not sure how to interept the mean value of 0.002323279 and standard deviation 0.04867576 when the outcome variable takes on any value from 0 to 1 or 2 or 10 $\endgroup$ – Science11 Aug 26 '18 at 17:02
  • $\begingroup$ Perhaps en.wikipedia.org/wiki/Expected_value will help? $\endgroup$ – jbowman Aug 26 '18 at 17:04
  • $\begingroup$ @jbowman, i know what expected value means, and the theory behind it, The expected value in a die experiement is 3.5 etc.. I am not not understanding what you are saying :) $\endgroup$ – Science11 Aug 26 '18 at 17:14
  • 2
    $\begingroup$ The Poisson distribution with this mean indicates you should obtain only about one value exceeding 1 in a dataset this size, whereas you observe 10 of them. That's a significant difference. However, all this analysis is irrelevant because your regression model would not assume the response variable has a Poisson distribution: it assumes that the response conditional on the explanatory variables has a Poisson distribution. Thus, it looks like you're generating irrelevant (and possibly misleading) information with this line of inquiry. Consider post hoc GoF testing of a Poisson regression. $\endgroup$ – whuber Aug 26 '18 at 20:06
4
$\begingroup$

For Poisson distribution, the mean and variance (not sd) are assumed equal. In your example, var = 0.00236932961 (just by squaring sd). That's pretty close to the mean.

However, this does not confirm the validity of assuming Poisson distribution...

On a more practical note, there are R packages for estimations Negative Binomial dependent variable (glm.nb() in {MASS}) , etc. Also, you can test Poisson regression model for overdispersion, i.e. "mean = variance" against "mean < variance" in R. Check the {AER} package for dispersiontest().

$\endgroup$
  • 1
    $\begingroup$ I agree, thanks for the suggestion, I will do that $\endgroup$ – Science11 Aug 26 '18 at 17:16

Your Answer

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

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