residuals.eba: Residuals for EBA Models

Description Usage Arguments Details Value See Also Examples

View source: R/EBA_fast.R

Description

Computes deviance and Pearson residuals for eba objects.

Usage

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

Arguments

object

an object of class eba, typically the result of a call to eba

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

Residuals are computed from the upper triangle of the paired-comparison matrix.

See residuals.glm for details.

Value

A vector of residuals having as many elements as pairs of stimuli.

See Also

eba, residuals.glm, plot.eba.

Examples

1
2
3
4
data(celebrities)                # absolute choice frequencies
btl1 <- eba(celebrities)         # fit Bradley-Terry-Luce model
sum( resid(btl1)^2 )             # deviance G2
sum( resid(btl1, "pearson")^2 )  # Pearson X2


eba documentation built on May 19, 2017, 2:10 p.m.
Search within the eba package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.