residuals.eba {eba} | R Documentation |
Computes deviance and Pearson residuals for eba
objects.
## S3 method for class 'eba': residuals(object, type = c("deviance", "pearson"), ...)
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. |
Residuals are computed from the upper triangle of the paired-comparison matrix.
See residuals.glm
for details.
A vector of residuals having as many elements as pairs of stimuli.
data(celebrities) # absolute choice frequencies btl1 <- eba(celebrities) # fit BTL model sum( resid(btl1)^2 ) # deviance sum( resid(btl1, "pearson")^2 ) # Pearson chi2