The four types "deviance"
(default), "pearson"
, "response"
are "working"
are, for GLM families, the same that are returned by residuals.glm
. "working"
residuals may be returned only for fixed-effect models. "deviance"
residuals are the signed square root of those returned by dev_resids
.
Following Lee et al. (2006, p.52), the standardized deviance residuals returned for type="std_dev_res"
are defined as the deviance residuals divided by \(\phi\sqrt(1-q)\), where the deviance residuals are defined as for a GLM, \(\phi\) is the dispersion parameter of the response family (a vector of values, for heteroscedastic cases), and \(q\) is a vector of leverages given by hatvalues(., type="std")
(see hatvalues
for details about these specific standardizing leverages).
These definitions are special cases of more general ones holding for non-GLM response families. In the latter case, the deviance residuals are as defined in Details of llm.fit
, and "std_dev_res"
residuals are defined from them as above for GLM response families, with the additional convention that \(\phi=1\). Pearson residuals and response residuals are defined as in stats:::residuals.glm
. The "working"
residuals are defined for each response as \(- [d \log(clik)/d \eta]/[d^2 \log(clik)/d \eta^2]\) where clik is the conditional likelihood.