Description Usage Arguments Details Value Examples
A function that executes item-wise score-based DIF tests. After fitting an
IRT model with mirt
, the fitted object can be used to
assess and test measurement invariance, using
sctest
. However, by default, all parameters of
the fitted model are tested simultaneously. This function applies the
sctest
to test for item-wise DIF, in an efficient
way.
1 2 3 4 5 6 7 8 |
object |
a fitted model object of class |
DIF_covariate |
a vector with the person covariate to use for the DIF-test. The covariate can be categorical, ordered categorical or numerical. |
functional |
a character specifying the functional (or test statistic) to be used. See details for more information. |
item_selection |
either |
decorrelate |
a logical. Should the process be decorrelated? |
... |
other arguments passed to the |
For more information about the functional see the documentation of
sctest.default
or
sctest.formula
. When functional = NULL
(which is the default), the functional is chosen based on the class of
DIF_covariate
. In this case, for integer
and numeric
vectors
the Double Maximum ("DM"
) is used; for ordered
vectors the
Maximum Lagrange Multiplier Test for Ordered Groups ("maxLMo"
) is
used; and for factor
, character
, and logical
vectors the
Lagrange Multiplier Test for Unordered Groups is used.
An object of class scDIFtest
scDIFtest-Methods, which is a list with three elements
A named list with a number of elements equal to the number of
the items for which DIF should be detected. Each element
contains information both about the test single_test
as well as the efpFunctional
A named list with two elements. test_info
contains
information such as used test statistic and the used covariate.
item_info
contains information about the items such as
the item types as well as the column numbers of the score matrix
that correspond to the estimated parameters of the items.
The Generalized Empirical M-Fluctuation Process (gefp
)
based on the complete model with all the estimated parameters
(see gefp
).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | library(mirt)
library(scDIFtest)
### data and model
dat <- expand.table(LSAT7)
nObs <- dim(dat)[1]
mod <- mirt(dat, 1, itemtype = "2PL", constr = list(c(2, 1)))
### DIF along a metric variable
### the default test statistic is the Double Maximum (dm)
metric <- rnorm(nObs)
DIF_metric <- scDIFtest(mod, DIF_covariate = metric)
DIF_metric
plot(DIF_metric, 1)
### DIF along an ordered categorical variable
### the default test statistic is the Maximum Lagrange Multiplier Test
### for Ordered Groups (maxlmo)
ordered <- ordered(sample(1:5, size = nObs, replace = TRUE))
DIF_ordered <- scDIFtest(mod, DIF_covariate = ordered)
summary(DIF_ordered)
### Note that the Generalized Empirical M-Fluctuation Process (gefp) based on all
### the estimated parameters in the model is an element of the resulting
### scDIFtest object. This means that one can use this gefp to test the
### general hypothesis of measurement invariance with respect to the
### chosen covariate.
strucchange::sctest(DIF_metric$gefp)
strucchange::sctest(DIF_ordered$gefp)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.