Performs DIF detection procedure for ordinal data based either on adjacent category logit model or on cumulative logit model and likelihood ratio test of a submodel.
difORD(Data, group, focal.name, model = "adjacent", type = "both", match = "zscore",
anchor = NULL, purify = FALSE, nrIter = 10, p.adjust.method = "none",
alpha = 0.05, parametrization)The difORD() function returns an object of class
"difORD". The output including values of the test
statistics, p-values, and items marked as DIF is displayed by the
print() method.
A list of class "difORD" with the following arguments:
Svalthe values of likelihood ratio test statistics.
ordPARthe estimates of the final model.
ordSEstandard errors of the estimates of the final model.
parM0the estimates of null model.
parM1the estimates of alternative model.
llM0log-likelihood of null model.
llM1log-likelihood of alternative model.
AICM0AIC of null model.
AICM1AIC of alternative model.
BICM0BIC of null model.
BICM1BIC of alternative model.
DIFitemseither the column identifiers of the items which were detected as DIF, or
"No DIF item detected" in case no item was detected as DIF.
modelmodel used for DIF detection.
typecharacter: type of DIF that was tested.
purificationpurify value.
nrPurnumber of iterations in item purification process. Returned only if purify
is TRUE.
difPura binary matrix with one row per iteration of item purification and one column per item.
"1" in i-th row and j-th column means that j-th item was identified as DIF in i-th iteration. Returned only
if purify is TRUE.
conv.purilogical indicating whether item purification process converged before the maximal number
nrIter of iterations. Returned only if purify is TRUE.
p.adjust.methodcharacter: method for multiple comparison correction which was applied.
pvalthe p-values by likelihood ratio test.
adj.pvalthe adjusted p-values by likelihood ratio test using p.adjust.method.
dfthe degress of freedom of likelihood ratio test.
alphanumeric: significance level.
Datathe data matrix.
groupthe vector of group membership.
group.nameslevels of grouping variable.
matchmatching criterion.
For an object of class "difORD" several methods are available (e.g., methods(class = "difORD")).
data.frame or matrix: dataset which rows represent
ordinally scored examinee answers and columns correspond to the
items. In addition, Data can hold the vector of group
membership.
numeric or character: a dichotomous vector of the same
length as nrow(Data) or a column identifier of
Data.
numeric or character: indicates the level of
group which corresponds to focal group.
character: logistic regression model for ordinal data
(either "adjacent" (default) or "cumulative"). See
Details.
character: type of DIF to be tested. Either
"both" for uniform and non-uniform DIF (default), or
"udif" for uniform DIF only, or "nudif" for
non-uniform DIF only. Can be specified as a single value (for all
items) or as an item-specific vector.
numeric or character: matching criterion to be used as
an estimate of trait. Can be either "zscore" (default,
standardized total score), "score" (total test score), or
vector of the same length as number of observations in
Data.
numeric or character: specification of DIF free
items. Either NULL (default), or a vector of item names
(column names of Data), or item identifiers (integers
specifying the column number) determining which items are
currently considered as anchor (DIF free) items. Argument is
ignored if match is not "zscore" or "score".
logical: should the item purification be applied?
(default is FALSE).
numeric: the maximal number of iterations in the item purification (default is 10).
character: method for multiple comparison
correction. Possible values are "holm", "hochberg",
"hommel", "bonferroni", "BH", "BY",
"fdr", and "none" (default). For more details see
p.adjust.
numeric: significance level (default is 0.05).
deprecated. Use
coef.difORD for different
parameterizations.
Adela Hladka (nee Drabinova)
Institute of Computer Science of the Czech Academy of Sciences
Faculty of Mathematics and Physics, Charles University
hladka@cs.cas.cz
Patricia Martinkova
Institute of Computer Science of the Czech Academy of Sciences
martinkova@cs.cas.cz
Calculates DIF likelihood ratio statistics based either on adjacent category logit model or on cumulative logit model for ordinal data.
Using adjacent category logit model, logarithm of ratio of probabilities of two adjacent categories is $$log(P(y = k) / P(y = k - 1)) = b_0k + b_1 * x + b_2k * g + b_3 * x:g,$$ where \(x\) is by default standardized total score (also called Z-score) and \(g\) is a group membership.
Using cumulative logit model, probability of gaining at least \(k\) points is given by 2PL model, i.e., $$P(y >= k) = exp(b_0k + b_1 * x + b_2k * g + b_3 * x:g) / (1 + exp(b_0k + b_1 * x + b_2k * g + b_3 * x:g)).$$ The category probability (i.e., probability of gaining exactly \(k\) points) is then \(P(y = k) = P(y >= k) - P(y >= k + 1)\).
Both models are estimated by iteratively reweighted least squares.
For more details see vglm.
Missing values are allowed but discarded for item estimation. They
must be coded as NA for both, Data and group
parameters.
Agresti, A. (2010). Analysis of ordinal categorical data. Second edition. John Wiley & Sons.
Hladka, A. (2021). Statistical models for detection of differential item functioning. Dissertation thesis. Faculty of Mathematics and Physics, Charles University.
Hladka, A. & Martinkova, P. (2020). difNLR: Generalized logistic regression models for DIF and DDF detection. The R Journal, 12(1), 300--323, tools:::Rd_expr_doi("10.32614/RJ-2020-014").
plot.difORD for graphical representation of item characteristic curves.
coef.difORD for extraction of item parameters with their standard errors.
predict.difORD for calculation of predicted values.
logLik.difORD, AIC.difORD, BIC.difORD
for extraction of log-likelihood and information criteria.
p.adjust for multiple comparison corrections.
vglm for estimation function using iteratively reweighted least squares.