dif_models | R Documentation |
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).
dif_models(dif.analysis, biased.items = "IRT", item.type = NULL)
dif.analysis |
Output from |
biased.items |
One of |
item.type |
For IRT, the type of model to fit for each item. The default is |
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
.
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
).
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.