residuals.izip: Extract iZIP Model Residuals

Description Usage Arguments Value See Also Examples

View source: R/summarize_extract.R

Description

residuals is a generic function which extracts model residuals from objects returned by the modelling function glm.izip or tsglm.izip. resid is an alias for residuals .

Usage

1
2
3
4
5
## S3 method for class 'izip'
residuals(object, type = c("deviance", "pearson", "response"), ...)

## S3 method for class 'tsizip'
residuals(object, type = c("response", "pearson"), ...)

Arguments

object

an object class 'izip' or 'tsizip', obtained from a call to glm.izip or tsglm.izip.

type

the type of residuals which should be returned. The alternatives are: 'deviance' (default), 'pearson' and 'response' for an 'izip' object; 'response' (default), and 'pearson' for an 'tsizip' object. Can be abbreviated.

...

other arguments passed to or from other methods (currently unused).

Value

Residuals extracted from the object object.

See Also

coef.izip, fitted.izip, glm.izip, coef.tsizip, fitted.tsizip, tsglm.izip

Examples

1
2
3
4
5
6
7
8
9
data(bioChemists)
M_bioChem <- glm.izip(art ~ ., data = bioChemists)
# deviance residuals
residuals(M_bioChem)

data(arson)
M_arson <- tsglm.izip(arson ~ 1, past_mean_lags = 1, past_obs_lags = c(1, 2))
# pearson residuals
resid(M_arson, type = "pearson")

thomas-fung/izipr documentation built on Dec. 23, 2021, 9:57 a.m.