Return model implied residuals for linear dependencies between items or at the person level.
# S4 method for SingleGroupClass
residuals(object, type = "LD", df.p = FALSE,
full.scores = FALSE, QMC = FALSE, printvalue = NULL, tables = FALSE,
verbose = TRUE, Theta = NULL, suppress = 1, theta_lim = c(-6, 6),
quadpts = NULL, ...)
an object of class SingleGroupClass
or
MultipleGroupClass
. Bifactor models are automatically detected and utilized for
better accuracy
type of residuals to be displayed.
Can be either 'LD'
or 'LDG2'
for a local dependence matrix based on the
X2 or G2 statistics (Chen & Thissen, 1997), 'Q3'
for the statistic proposed by
Yen (1984), or 'exp'
for the expected values for the frequencies of every response pattern.
For the 'LD' and 'LDG2' types, the upper diagonal elements represent the standardized
residuals in the form of signed Cramers V coefficients
logical; print the degrees of freedom and p-values?
logical; compute relevant statistics for each subject in the original data?
logical; use quasi-Monte Carlo integration? If quadpts
is omitted the
default number of nodes is 5000
a numeric value to be specified when using the res='exp'
option. Only prints patterns that have standardized residuals greater than
abs(printvalue)
. The default (NULL) prints all response patterns
logical; for LD type, return the observed, expected, and standardized residual tables for each item combination?
logical; allow information to be printed to the console?
a matrix of factor scores used for statistics that require empirical estimates (i.e., Q3).
If supplied, arguments typically passed to fscores()
will be ignored and these values will
be used instead
a numeric value indicating which parameter local dependency combinations to flag as being too high. Absolute values for the standardized estimates greater than this value will be returned, while all values less than this value will be set to NA
range for the integration grid
number of quadrature nodes to use. The default is extracted from model (if available) or generated automatically if not available
additional arguments to be passed to fscores()
Chalmers, R., P. (2012). mirt: A Multidimensional Item Response Theory Package for the R Environment. Journal of Statistical Software, 48(6), 1-29. 10.18637/jss.v048.i06
Chen, W. H. & Thissen, D. (1997). Local dependence indices for item pairs using item response theory. Journal of Educational and Behavioral Statistics, 22, 265-289.
Yen, W. (1984). Effects of local item dependence on the fit and equating performance of the three parameter logistic model. Applied Psychological Measurement, 8, 125-145.
# NOT RUN {
# }
# NOT RUN {
x <- mirt(Science, 1)
residuals(x)
residuals(x, tables = TRUE)
residuals(x, type = 'exp')
residuals(x, suppress = .15)
# with and without supplied factor scores
Theta <- fscores(x)
residuals(x, type = 'Q3', Theta=Theta)
residuals(x, type = 'Q3', method = 'ML')
# }
Run the code above in your browser using DataLab