Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

residuals

Residuals for IRT models


Description

Computes the residuals for vectors of response patterns.

Usage

## S3 method for class 'gpcm'
residuals(object, resp.patterns = NULL, order = TRUE, ...)

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

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

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

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

Arguments

object

an object inheriting either from class gpcm, 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.

Details

The following residuals are computed:

(O_i - E_i) / E_i^(1/2),

where O_i and E_i denote the observed and expected frequencies for the ith response pattern.

Value

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

Author(s)

Dimitris Rizopoulos d.rizopoulos@erasmusmc.nl

See Also

Examples

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

ltm

Latent Trait Models under IRT

v1.1-1
GPL (>= 2)
Authors
Dimitris Rizopoulos <d.rizopoulos@erasmusmc.nl>
Initial release
2018-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.