residuals.gtReg {binGroup2}R Documentation

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 class 'gtReg'
residuals(object, type = c("deviance", "pearson", "response"), ...)

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.

Value

Residuals of group responses extracted from the object object.

Author(s)

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

Examples

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

[Package binGroup2 version 1.3.1 Index]