Learn R Programming

mirt (version 1.3)

residuals-method: Compute model residuals

Description

Return model implied residuals for linear dependencies between items or at the person level.

Usage

## S3 method for class 'ExploratoryClass':
residuals(object, type = "LD", digits = 3,
  df.p = FALSE, full.scores = FALSE, printvalue = NULL, tables = FALSE,
  verbose = TRUE, Theta = NULL, ...)

Arguments

object
an object of class ExploratoryClass, ConfirmatoryClass or MultipleGroupClass. Bifactor models are automatically detected and utilized for better accuracy
type
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
tables
logical; for LD type, return the observed, expected, and standardized residual tables for each item combination?
digits
number of significant digits to be rounded
df.p
logical; print the degrees of freedom and p-values?
full.scores
logical; compute relevant statistics for each subject in the original data?
printvalue
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
verbose
logical; allow information to be printed to the console?
Theta
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
...
additional arguments to be passed to fscores()

References

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.

Examples

Run this code
x <- mirt(Science, 1)
residuals(x)
residuals(x, tables = TRUE)
residuals(x, type = 'exp')

# with and without supplied factor scores
Theta <- fscores(x, full.scores=TRUE, scores.only=TRUE)
residuals(x, type = 'Q3', Theta=Theta)
residuals(x, type = 'Q3', method = 'ML')

Run the code above in your browser using DataLab