The anchor
function provides a variety of anchor
methods for the detection of uniform differential item functioning (DIF)
in the Rasch model between two pre-specified groups. These methods can
be divided in an anchor class that determines characteristics of the
anchor method and an anchor selection that determines the ranking order
of candidate anchor items. The aim of the anchor
function is to
provide anchor items for DIF testing, e.g. with
anchortest
.
anchor(object, …)
# S3 method for default
anchor(object, object2,
class = c("constant", "forward"), select = NULL,
length = NULL, range = c(0.1, 0.8), …)
# S3 method for formula
anchor(formula, data = NULL, subset = NULL,
na.action = NULL, weights = NULL, model = raschmodel, …)
Fitted model objects of class ``raschmodel''
estimated via conditional maximum likelihood using raschmodel
.
further arguments passed over to an internal call
of anchor.default
in the formula method. In the
default method, these additional arguments are currently not being used.
character. Available anchor classes are the
constant
anchor class implying a constant anchor length
defined by length
and the iterative forward
anchor
class, for an overview see Kopf et al. (2014a).
character. Several anchor selection strategies are
available: "MTT"
, "MPT"
, "MT"
, "MP"
,
"NST"
, "AO"
, "AOP"
. For details see below and
Kopf et al. (2014b). Following their recommendations, the default
selection = "MPT"
is used for class = "constant"
whereas
selection = "MTT"
is used for class = "forward"
.
integer. It pre-defines a maximum anchor length.
Per default, the forward
anchor grows up to the proportion
of currently presumed DIF-free items specified in range
and the constant
anchor class selects four anchor items,
unless an explicit limiting number is defined in length
by the user.
numeric vector of length 2. The first element is
the percentage of first anchor candidates to be excluded for
consideration when the forward
anchor class is used and the
second element determines a percentage of currently presumed DIF-free
items up to which the anchor from the forward
anchor class is
allowed to grow.
formula of type y ~ x
where y
specifies a
matrix of dichotomous item responses and x
the grouping
variable, e.g., gender, for which DIF should be tested for.
a data frame containing the variables of the specified
formula
.
logical expression indicating elements or rows to keep: missing values are taken as false.
a function which indicates what should happen when the data
contain missing values (NA
s).
an optional vector of weights (interpreted as case weights).
an IRT model fitting function with a suitable itempar
method, by default raschmodel
.
An object of class anchor
, i.e. a list including
the anchor items for DIF analysis
a ranking order of candidate anchor items
the criterion values obtained by the respective anchor selection
The anchor methods provided consist of an anchor class that determines characteristics of the anchor and an anchor selection that determines the ranking order of candidate anchor items.
In the constant
anchor class, the anchor length is pre-defined by the
user within the argument length
. The default is four anchor
items. The iterative forward
class starts with a single anchor item and
includes items in the anchor as long as the anchor length is shorter
than a certain percentage of the number of items that do not display
statistically significant DIF (default: 0.8). Furthermore, a percentage
of first anchor candidates is excluded from consideration (default: 0.1)
and the user is allowed to set a maximum number of anchor items using the
argument length
. A detailed description of the anchor classes can be found
in Kopf et al. (2014a).
Both anchor classes require an explicit anchor selection strategy (as opposed to
the all-other
anchor class which is therefore not included in the
function anchor
). The anchor selection strategy determines the ranking order of
candidate anchor items. In case of two groups, each item \(j, j = 1,
\ldots, k\) (where \(k\) denotes the number of
items in the test) obtains a criterion value \(c_j\) that is
defined by the anchor selection strategy. The ranking order is
determined by the rank of the criterion value
rank\((c_j)\).
The criterion values are defined by the respective anchor selection strategy as in the following equations, where \(1\) denotes the indicator function, \(t_j\) denotes the test statistic for item \(j\), followed by the underlying anchor items in parenthesis, \(p_j\) the corresponding p-values (also with anchor items in parenthesis), \(\lceil 0.5\cdot k\rceil\) denotes the empirical 50% quantile and \(A_{purified}\) the anchor after purification steps (a detailed description of the anchor selection strategies implemented in this function is provided in Kopf et al., 2014b).
All-other selection by Woods(2009), here abbreviated AO: $$ c_j^{AO} = | t_j (\{1,\ldots,k\}\textbackslash j) |$$
All-other purified selection by Wang et al. (2012), here abbreviated AOP: $$ c_j^{AOP} = | t_j ( A_{purified} ) |$$
Number of significant threshold selection based on Wang et al. (2004), here abbreviated NST: $$ c_j^{NST} = \sum_{l \in \{1,\ldots,k\} \textbackslash j} 1 \left\{ p_j ( \{l\} ) \leq \alpha \right\}) |$$
Mean test statistic selection by Shih et al. (2009), here abbreviated MT: $$ c_j^{MT} = \frac{1}{k-1} \sum_{l \in \{1,\ldots,k\} \textbackslash j} \left| t_j ( \{l\}) \right| $$
Mean p-value selection by Kopf et al. (2014b), here abbreviated MP: $$ c_j^{MP} = - \frac{1}{k-1} \sum_{l \in \{1,\ldots,k\} \textbackslash j} p_j ( \{l\} ) $$
Mean test statistic threshold selection by Kopf et al. (2014b), here abbreviated MTT: $$ c_j^{MTT} = \sum_{l \in \{1,\ldots,k\} \textbackslash j} 1 \left\{ \left| t_j ( \{l\} ) \right| > \left( \left| \frac{1}{k-1} \sum_{l \in \{ 1, \ldots, k \} \textbackslash j} t_j ( \{l\} ) \right| \right)_{\left( \lceil 0.5\cdot k\rceil \right)} \right\} $$
Mean p-value threshold selection by Kopf et al. (2014b), here abbreviated MPT: $$ c_j^{MPT} = - \sum_{l \in \{1,\ldots,k\} \textbackslash j} 1 \left\{ p_j ( \{l\} ) > \left( \frac{1}{k-1} \sum_{l \in \{ 1, \ldots, k \} \textbackslash j} p_j ( \{l\} ) \right)_{ \left( \lceil 0.5\cdot k\rceil \right)} \right\} $$
Kopf et al. (2015b) recommend to combine the class = "constant"
with
select = "MPT"
and the class = "forward"
with select = "MTT"
,
respectively.
The all-other
anchor class (that assumes that DIF is balanced i.e. no
group has an advantage in the test) is here
not considered as explicit anchor selection and, thus, not included
in the anchor
function (but in the anchortest
function). Note that the all-other
anchor class requires strong prior
knowledge that DIF is balanced.
Kopf J, Zeileis A, Strobl C (2015a). A Framework for Anchor Methods and an Iterative Forward Approach for DIF Detection. Applied Psychological Measurement, 39(2), 83--103. 10.1177/0146621614544195
Kopf J, Zeileis A, Strobl C (2015b). Anchor Selection Strategies for DIF Analysis: Review, Assessment, and New Approaches. Educational and Psychological Measurement, 75(1), 22--56. 10.1177/0013164414529792
Shih CL, Wang WC (2009). Differential Item Functioning Detection Using the Multiple Indicators, Multiple Causes Method with a Pure Short Anchor. Applied Psychological Measurement, 33(3), 184--199.
Wang WC (2004). Effects of Anchor Item Methods on the Detection of Differential Item Functioning within the Family of Rasch Models. Journal of Experimental Education, 72(3), 221--261.
Wang WC, Shih CL, Sun GW (2012). The DIF-Free-then-DIF Strategy for the Assessment of Differential Item Functioning. Educational and Psychological Measurement, 72(4), 687--708.
Woods C (2009). Empirical Selection of Anchors for Tests of Differential Item Functioning. Applied Psychological Measurement, 33(1), 42--57.
# NOT RUN {
## Verbal aggression data
data("VerbalAggression", package = "psychotools")
## Rasch model for the self-to-blame situations; gender DIF test
raschmodels <- with(VerbalAggression, lapply(levels(gender), function(i)
raschmodel(resp2[gender == i, 1:12])))
## four anchor items from constant anchor class using MPT-selection
canchor <- anchor(object = raschmodels[[1]], object2 = raschmodels[[2]],
class = "constant", select = "MPT", length = 4)
canchor
summary(canchor)
## iterative forward anchor class using MTT-selection
set.seed(1)
fanchor <- anchor(object = raschmodels[[1]], object2 = raschmodels[[2]],
class = "forward", select = "MTT", range = c(0.05, 1))
fanchor
## the same using the formula interface
set.seed(1)
fanchor2 <- anchor(resp2[, 1:12] ~ gender , data = VerbalAggression,
class = "forward", select = "MTT", range = c(0.05, 1))
## really the same?
all.equal(fanchor, fanchor2, check.attributes = FALSE)
# }
Run the code above in your browser using DataLab