Learn R Programming

binGroup2 (version 1.3.1)

residuals.gtReg: Extract model residuals from a fitted group testing model

Description

Extract model residuals from objects of class "gtReg" returned by gtReg.

Usage

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

Value

Residuals of group responses extracted from the object object.

Arguments

object

An object of class "gtReg", created by gtReg, from which the model residuals are to be extracted.

type

The type of residuals which should be returned. Options include "deviance" (default), "pearson", and "response".

...

currently not used.

Author

This function was originally written by Boan Zhang as the residuals.gt function for the binGroup package.

Examples

Run this code
data(hivsurv)
fit1 <- gtReg(formula = groupres ~ AGE * EDUC.,
              data = hivsurv, groupn = gnum,
              linkf = "probit")
residuals(object = fit1, type = "pearson")
residuals(object = fit1, type = "deviance")

Run the code above in your browser using DataLab