Learn R Programming

ltm (version 0.8-9)

residuals: Residuals for IRT models

Description

Computes the residuals for vectors of response patterns.

Usage

## S3 method for class 'grm':
residuals(object, resp.patterns = NULL, order = TRUE, \dots)

## S3 method for class 'ltm':
residuals(object, resp.patterns = NULL, order = TRUE, \dots)

## S3 method for class 'rasch':
residuals(object, resp.patterns = NULL, order = TRUE, \dots)

## S3 method for class 'tpm':
residuals(object, resp.patterns = NULL, order = TRUE, \dots)

Arguments

object
an object inheriting from either class grm, class ltm, class rasch or class tpm.
resp.patterns
a matrix or a data.frame of response patterns with columns denoting the items; if NULL the expected frequencies are computed for the observed response patterns.
order
logical; if TRUE the response patterns are sorted according to the residual estimates.
...
additional arguments; currently none is used.

Value

  • A numeric matrix containing the observed and expected frequencies as well as the residual value for each response pattern.

Details

The following residuals are computed: $$\frac{O_i - E_i}{\sqrt{E_i}},$$ where $O_i$ and $E_i$ denote the observed and expected frequencies for the $i$th response pattern.

See Also

fitted.grm, fitted.ltm, fitted.rasch, fitted.tpm

Examples

Run this code
fit <- ltm(LSAT ~ z1)
residuals(fit)
residuals(fit, order = FALSE)

Run the code above in your browser using DataLab