The likelihood-ratio test method (Thissen, Steinberg and Wainer, 1988) allows for detecting uniform differential item functioning
by fitting a closed-form Rasch model and by testing for extra interactions between group membership and item response. Currently only
the Rasch model can be used, so only uniform DIF can be detected. Moreover, items are tested one by one and the other items act as
anchor items.
The Data
is a matrix whose rows correspond to the subjects and columns to the items. Missing values are allowed but must be coded as NA
values.
In addition, Data
can hold the vector of group membership. If so, group
indicates the column of Data
which
corresponds to the group membership, either by specifying its name or by giving the column number. Otherwise, group
must
be a vector of same length as nrow(Data)
.
The vector of group membership must hold only two different values, either as numeric or character. The focal group is defined by
the value of the argument focal.name
.
The function glmer
from package lme4
(Bates and Maechler, 2009) is used to fit the closed-form Rasch model. More precisely, the probability that
response \(Y_{ijg}\) of subject i from group g (focal or reference) to item j is modeled as
$$logit (Pr(Y_{ijg}=1) = \theta_{ig} + \gamma_g - \beta_j$$
where \(\theta_i\) is subject's ability, \(\beta_j\) is the item difficulty and \(\gamma_g\) is the difference mean ability level between
the focal and the reference groups. Subject abilities are treated as random effects, while item difficulties and \(\gamma_g\) are treated as fixed effects.
Each item is tested by incorporating an interaction term, \(\delta_{gj}\), and by testing its statistical significance using the traditional
likelihood-ratio test.
The threshold (or cut-score) for classifying items as DIF is computed as the quantile of the chi-squared distribution with lower-tail
probability of one minus alpha
and one degree of freedom.
Item purification can be performed by setting purify
to TRUE
. In this case, items detected as DIF are iteratively
removed from the set of tested items, and the procedure is repeated (using the remaining items) until no additional item is
identified as functioning differently. The process stops when either there is no new item detected as DIF, or when nrIter
iterations
are run and new DIF items are nevertheless detected. In the latter case a warning message is printed.
Adjustment for multiple comparisons is possible with the argument p.adjust.method
. The latter must be an acronym of one of the available adjustment methods of the p.adjust
function. According to Kim and Oshima (2013), Holm and Benjamini-Hochberg adjustments (set respectively by "Holm"
and "BH"
) perform best for DIF purposes. See p.adjust
function for further details. Note that item purification is performed on original statistics and p-values; in case of adjustment for multiple comparisons this is performed after item purification.
The output of the difLRT
, as displayed by the print.LRT
function, can be stored in a text file provided that save.output
is set to TRUE
(the default value FALSE
does not execute the storage). In this case, the name of the text file must be given as a character string into the first component
of the output
argument (default name is "out"
), and the path for saving the text file can be given through the second component of output
. The
default value is "default"
, meaning that the file will be saved in the current working directory. Any other path can be specified as a character string: see the
Examples section for an illustration.
The plot.LRT
function displays the DIF statistics in a plot, with each item on the X axis. The type of point and the color are fixed by the usual pch
and
col
arguments. Option number
permits to display the item numbers instead. Also, the plot can be stored in a figure file, either in PDF or JPEG format.
Fixing save.plot
to TRUE
allows this process. The figure is defined through the components of save.options
. The first two components perform similarly
as those of the output
argument. The third component is the figure format, with allowed values "pdf"
(default) for PDF file and "jpeg"
for JPEG file.