Learn R Programming

binGroup (version 2.2-3)

residuals.gt: Extract Model Residuals From a Fitted Group Testing Model

Description

residuals.gt is a function which extracts model residuals from objects of class "gt" returned by gtreg.

Usage

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

Value

Residuals of group responses extracted from the object object.

Arguments

object

an object of class "gt" from which the model residuals are to be extracted.

type

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

...

currently not used

Author

Boan Zhang

Examples

Run this code

data(hivsurv)

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

Run the code above in your browser using DataLab