mstDIF: A general function to detect differential item functioning...

Description Usage Arguments Details Value Methods (by class) See Also Examples

View source: R/mstDIF.R

Description

This function allows the application of various methods for the detection of differential item functioning in multistage tests. Currently five methods are implemented: 1. Logistic Regression, 2. mstSIB, 3. analytical score-base tests, 4. a score-based Bootstrap test, 5. a score-based permutation test. The required input differs with regard to the selected DIF test.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Default S3 method:
mstDIF(resp, DIF_covariate, method, theta = NULL, see = NULL, ...)

## S3 method for class 'AllModelClass'
mstDIF(
  object,
  DIF_covariate,
  method,
  theta = NULL,
  see = NULL,
  theta_method = "WLE",
  ...
)

## S3 method for class 'dRm'
mstDIF(object, DIF_covariate, method, theta = NULL, see = NULL, ...)

Arguments

resp, object

A data frame or matrix containing the response matrix. Rows correspond to respondents, columns to items. Or an object of class SingleGroup-class or MultiGroup-class object as returned by mirt, or a dRm object as returned by the RM function in eRm.

DIF_covariate

A vector of ability estimates for each respondent.

method

A character value indicating the DIF test that should be used. Possible values are "logreg" (Logistic regression), "mstsib" (mstSIB), "bootstrap" (score-based Bootstrap test), "permutation" (score-based) permutation test) and "analytical" (analytical score-based test).

theta

Estimates of the ability parameters.

see

Estimates of the standard error of estimation.

...

Additional, test-specific arguments.

theta_method

Method for estimating the ability parameters if they should be estimated based on the responses. The calculation is carried out by the mirt package. Can be: "WLE" (default), "MAP", "EAP", "ML", "EAPsum", "plausible", "classify".

Details

Author: Rudolf Debelak and Dries Debeer

Value

An object of class mstDIF, which is a list with the following elements:

resp

The response matrix as a data frame.

method

The used DIF detection method.

test

The used test or statistic.

DIF_covariate

The person covariate tested for DIF.

DIF_test

A list with the DIF-test results.

call

The function call.

method_results

The complete output of the selected DIF test. Differs depending on the selection.

Methods (by class)

See Also

mstDIF-Methods

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## load data
data("toydata")
resp <- toydata$resp
group_categ <- factor(toydata$group_categ)
theta_est <- toydata$theta_est
see_est <- toydata$see_est

## test DIF along a categorical covariate (a factor) using the
## logistic regression method
res1 <- mstDIF(resp, DIF_covariate = group_categ, method = "logreg",
theta = theta_est)
res1
summary(res1)

## test DIF along a categorical covariate (a factor) using the
## mstSIB method
res2 <- mstDIF(resp, DIF_covariate = factor(group_categ), method = "mstsib",
theta = theta_est, see = see_est)
res2
summary(res2)

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