dif_models: Estimate a 2-group IRT model with biased items

View source: R/DIF-Models.R

dif_modelsR Documentation

Estimate a 2-group IRT model with biased items

Description

This function is a wrapper for multipleGroup that lets the user extract biased items from the output of dif.analysis or specify a custom list of biased items. All parameters of items identified as biased items are allowed to vary over groups (i.e. non-uniform DIF is assumed).

Usage

dif_models(dif.analysis, biased.items = "IRT", item.type = NULL)

Arguments

dif.analysis

Output from dif_analysis

biased.items

One of "IRT" "logistic", "MH", indicating the method from dif_analysis used to identify the biased items, or a numeric vector indicating the column indices of item.data that identify the biased items.

item.type

For IRT, the type of model to fit for each item. The default is "2PL" for dichotomous items and "graded" for polytomous items. See mirt for more options and details.

Details

Estimates a 2PL / GRM IRT model with the parameters of biased items freed over groups. A comparable model in which all item parameters are equal across the groups is either extracted from dif.analysis or estimated. The IRT models are estimated using multipleGroup.

Value

A named list containing the DIF and no-DIF IRT models, the column indices if item.data identifying the biased items, as well as the output of dif_data_prep (passed from dif.analysis).

Examples

data("mdat")

# prep data
dif.data <- dif_data_prep(item.data = mdat[5:ncol(mdat)],
                             dif.group.id = mdat$gender,
                             na.to.0 = TRUE)

dif.analysis <- dif_analysis(dif.data = dif.data, dif.methods =  c("MH", "IRT"))

# With biased items identified via DIF analysis
dif.models <- dif_models(dif.analysis = dif.analysis, biased.items = "MH")

# With user-specified biased items
dif.models2 <- dif_models(dif.analysis = dif.analysis, biased.items = c(1, 5, 7))


knickodem/WBdif documentation built on Feb. 3, 2024, 2:20 a.m.