Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I need to model a certain response variable in a GLM model. The response variable is a count (amount of insurance claims over a year). So it would be natural to assume a Poisson distribution for this response variable. However, using a goodness of fit test in R, how can I validate this assumption?
$\begingroup$This document has a good run down of most distribution goodness-of-fit measures in R. I would particularly look at fitdistr() in the MASS package and goodfit() in the vcd package.$\endgroup$
$\begingroup$Sorry, if your response variable depends on covariates (which it should if you want to model with a GLM) it probably is not Poisson distributed. However, that does not matter for regression. What matters is the residual distribution.$\endgroup$
fitdistr()
in theMASS
package andgoodfit()
in thevcd
package. $\endgroup$