residuals {ltm} | R Documentation |
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 |
resp.patterns |
a |
order |
logical; if |
... |
additional arguments; currently none is used. |
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.
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
fitted.gpcm
,
fitted.grm
,
fitted.ltm
,
fitted.rasch
,
fitted.tpm
Examples
fit <- ltm(LSAT ~ z1)
residuals(fit)
residuals(fit, order = FALSE)