residuals.blim: Residuals for Basic Local Independence Models

View source: R/blim.R

residuals.blimR Documentation

Residuals for Basic Local Independence Models

Description

Computes deviance and Pearson residuals for blim objects.

Usage

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

Arguments

object

an object of class blim, typically the result of a call to blim.

type

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

...

further arguments passed to or from other methods. None are used in this method.

Details

See residuals.glm for details.

Value

A named vector of residuals having as many elements as response patterns.

See Also

blim, residuals.glm, plot.blim.

Examples

data(DoignonFalmagne7)
blim1 <- blim(DoignonFalmagne7$K, DoignonFalmagne7$N.R)

sum( resid(blim1)^2 )                # likelihood ratio G2
sum( resid(blim1, "pearson")^2 )     # Pearson X2

pks documentation built on July 9, 2023, 5:43 p.m.