Learn R Programming

wsbackfit (version 1.0-5)

residuals.sback: sback residuals

Description

Returns residuals for a fitted sback object. Deviance, pearson, working and response residuals are available.

Usage

# S3 method for sback
residuals(object, type = c("deviance", "pearson", "working", "response"), ...)

Arguments

object

an object of class sback as produced by sback.

type

the type of residuals which should be returned: "deviance" (default), "pearson", "working" and "response".

further arguments passed to or from other methods. Not yet implemented.

Value

Numeric vector with the residuals.

Details

For details see residuals.glm.

See Also

sback, summary.sback, plot.sback.

Examples

Run this code
# NOT RUN {
library(wsbackfit)
data(infect)

# Generalized varying coefficient model with binary response
m3 <- sback(formula = inf ~ sb(gluc, h = 10) + sb(gluc, by = linf, h = 10), 
  data = infect, family = "binomial", kbin = 15)

summary(m3)

# Deviance
summary(residuals(m3))

# Pearson
summary(residuals(m3, type = "pearson"))
# }

Run the code above in your browser using DataLab