First of all, I am using R. I know that we can model a frequency-response variable with a Poisson regression, if we remember to weight it, so that the variance doesn't get affected by it. I am not entirely sure what is happening. My exposure ranges from 0 to 1. When I encode the glm in R in two equivalent ways (see below), I get similar summary outputs, but when I run dispersiontest, it gives me different results.
glm( Y ~ X_1 + X_2 + offset(log(exposure)), family=poisson("log”) )
glm( Y/exposure ~ X_1 + X_2, weights = exposure,
family=poisson("log") )
Let's say that the Y's are simulated to be Poisson distributed. When I run a dispersiontest in the AER package, I get overdispersion in the second method, probably meaning that the dispersiontest cannot be used when we model a frequency. Am I right?
w = 0.5andy=1andglm(y~1 + offset(log(w)), family=poisson). I think you need to give more details. Might be a stackoverflow question at its heart. – AdamO Mar 04 '20 at 23:16