Computes the residuals for vectors of response patterns.
# S3 method for gpcm
residuals(object, resp.patterns = NULL, order = TRUE, …)# S3 method for grm
residuals(object, resp.patterns = NULL, order = TRUE, …)
# S3 method for ltm
residuals(object, resp.patterns = NULL, order = TRUE, …)
# S3 method for rasch
residuals(object, resp.patterns = NULL, order = TRUE, …)
# S3 method for tpm
residuals(object, resp.patterns = NULL, order = TRUE, …)
an object inheriting either from class gpcm
, class grm
, class ltm
, class rasch
or class
tpm
.
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.
logical; if TRUE
the response patterns are sorted according to the residual estimates.
additional arguments; currently none is used.
A numeric matrix
containing the observed and expected frequencies as well as the residual value for
each response pattern.
The following residuals are computed:
fitted.gpcm
,
fitted.grm
,
fitted.ltm
,
fitted.rasch
,
fitted.tpm
# NOT RUN {
fit <- ltm(LSAT ~ z1)
residuals(fit)
residuals(fit, order = FALSE)
# }
Run the code above in your browser using DataLab