Description Usage Arguments Details Value See Also
Extract Residuals of Gamma Poisson Model
1 2 3 4 5 6 |
object |
a fit of type |
type |
the type of residual that is calculated. See details for more information.
Default: |
... |
currently ignored. |
This method can calculate a range of different residuals:
The deviance for the Gamma-Poisson model is
dev = 2 * (1/theta * log((1 + m * theta) / (1 + y * theta)) - y log((m + y * theta) / (y + y * m * theta)))
and the residual accordingly is
res = sign(y - m) sqrt(dev).
The Pearson residual is res = (y - m) / sqrt(m + m^2 * theta)
The randomized quantile residual was originally developed
by Dunn & Smyth, 1995. Please see that publication or statmod::qresiduals()
for more
information.
The working residuals are res = (y - m) / m.
The response residuals are res = y - m
a matrix with the same size as fit$data
. If fit$data
contains a DelayedArray
than the
result will be a DelayedArray
as well.
glm_gp()
and 'stats::residuals.glm()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.