permutation_sctest: A score-based DIF test using the permutation approach.

Description Usage Arguments Details Value See Also Examples

View source: R/permutation_sctest.R

Description

permutation_sctest computes score test to detect DIF in multiple item/parameters with respect to multiple person covariates (DIF_covariate). To obtain the p-values a resampling approach is applied. That is, person orders are randomly permuted to sample from the test statistic distribution 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 are tested for, respectively the item discriminations and the item difficulties.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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 resp, specifying the items for which the test should be computed. When set to NULL (i.t., the default), all the items are tested.

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 theta == NULL.

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

bootstrap_sctest

Examples

1
2
3
4
5
6
7
8
9
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)

mstDIF documentation built on July 24, 2020, 5:08 p.m.