bootstrap_sctest: A score-based DIF test using the parametric bootstrap...

View source: R/bootstrap_sctest.R

bootstrap_sctestR Documentation

A score-based DIF test using the parametric bootstrap approach.

Description

bootstrap_sctest computes a score test to detect DIF in multiple item/parameters with respect to multiple person covariates (DIF_covariate). A parametric bootstrap 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

bootstrap_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

permutation_sctest

Examples


data("toydata")
resp <- toydata$resp
group_categ <- toydata$group_categ
it <- toydata$it
discr <- it[,1]
diff <- it[,2]

bootstrap_sctest(resp = resp, DIF_covariate = group_categ, a = discr, b = diff, 
decorrelate = FALSE)



mstDIF documentation built on Dec. 2, 2022, 5:10 p.m.