permutation_sctest {mstDIF} | R Documentation |
A score-based DIF test using the permutation approach.
Description
permutation_sctest
computes a score test to detect DIF in multiple
item/parameters with respect to multiple person covariates (DIF_covariate
).
A resampling approach is applied to obtain p-values. That is, given the (item and
person) parameters, new data sets are sampled to create the distribution of the
test statistic under the null hypothesis. The functionality is limited to the
1-, 2-, and 3-parameter logistic models.
Only DIF with respect to the a
and b
parameters is tested for,
which correspond to the item discrimination and the item difficulty parameters.
Usage
permutation_sctest(
resp,
theta = NULL,
a = rep(1, length(b)),
b,
c = rep(0, length(b)),
DIF_covariate = NULL,
parameters = c("per_item", "ab", "a", "b"),
item_selection = NULL,
nSamples = 1000,
theta_method = c("wle", "mle", "eap", "map"),
slope_intercept = FALSE,
statistic = "auto",
meanCenter = TRUE,
decorrelate = FALSE,
impact_groups = rep(1, dim(resp)[1])
)
Arguments
resp |
A matrix (or data frame) containing the responses, with the items in the columns. |
theta |
A vector with the true/estimated ability parameters or NULL (the default) which leads to the ability parameters being estimated. |
a |
A vector of item slopes/item discriminations. |
b |
A vector of item locations/item difficulties. |
c |
A vector of pseudo guessing parameters. |
DIF_covariate |
A list with the person covariate(s) to test for as element(s). |
parameters |
A character string, either "per_item", "ab", "a", or "b", to specify which parameters should be tested for. |
item_selection |
A character vector with the column names or an integer
vector with the column numbers in the |
nSamples |
An integer value with the number of permutations to be sampled. |
theta_method |
A character string, either "wle", "mle", "eap", of
"map" that specifies the estimator for the ability estimation. Only
relevant when |
slope_intercept |
A logical value indicating whether the slope-intercept formulation of the 2-/3-PL model should be used. |
statistic |
A character string, either "auto", "DM", "CvM", "maxLM", "LMuo", "WDMo", or "maxLMo", specifying the test statistic to be used. |
meanCenter |
A logical value: should the score contributions be mean centered per parameter? |
decorrelate |
A logical value: should the score contributions be decorrelated? |
impact_groups |
A vector indicating impact-group membership for each person. |
Details
Author: Dries Debeer
Value
A list with four elements:
statistics
A matrix containing all the test statistics.
p
A matrix containing the obtained p-values.
nSamples
The number of samples taken.
DIF_covariate
A list containing all the covariate(s) used to order the score contributions, as well as the used test statistics.
See Also
Examples
data("toydata")
resp <- toydata$resp
group_categ <- toydata$group_categ
it <- toydata$it
discr <- it[,1]
diff <- it[,2]
permutation_sctest(resp = resp, DIF_covariate = group_categ, a = discr, b = diff,
decorrelate = FALSE)