Poisson regression is commonly used to analyse count data. However, when we deal with rare events it does not seem to be appropriate any more. At least, graphical criteria to assess the model fit like Pearson residuals or deviance residuals are inappropriate.
How do we have to deal with that?
For example, consider the following toy example. Coefficient estimates are actually close to the ‚true‘ values which we never know, of course. So, how can we evaluate and measure the model fitness?
Edit to clarify the question: I think the significance tests for the parameter in the summary output use the the Pearson and deviance residuals, at least implicitly. So if these residuals are not appropriate in this case, how reliable are the significance tests?
# Toy-Example (Poisson Regression, Rare Event)
set.seed(11)
N <- 100000
# Two categorical variables
I1 <- sample(c(0,1), size = N, replace = TRUE)
I2 <- sample(c(0,1), size = N, replace = TRUE)
lambda <- 0.05*0.9^I1*1.2^I2
Y <- rep(0,N)
for (i in 1:N){
Y[i] <- rpois(1,lambda=lambda[i])
}
model <- glm(Y ~ I1 + I2, family = poisson())
summary(model)
# Coefficients are close to the true values
exp(model$coefficients)
# However residuals look awful
res0 <- Y - model$fitted.values
res1 <- residuals(model, "pearson")
res2 <- residuals(model, "deviance")
par(mfrow=c(2,3))
plot(model$fitted.values,res0, main = "Raw Residuals")
plot(model$fitted.values,res1, main = "Pearson Residuals")
plot(model$fitted.values,res2, main = "Deviance Residuals")
#
boxplot(res0, main = "Raw Residuals")
boxplot(res1, main = "Pearson Residuals")
boxplot(res2, main = "Deviance Residuals")