anchor | R Documentation |
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, ...)
## Default S3 method:
anchor(object, object2,
class = c("constant", "forward"), select = NULL,
length = NULL, range = c(0.1, 0.8), ...)
## S3 method for class 'formula'
anchor(formula, data = NULL, subset = NULL,
na.action = NULL, weights = NULL, model = raschmodel, ...)
object , object2 |
Fitted model objects of class “raschmodel”
estimated via conditional maximum likelihood using |
... |
further arguments passed over to an internal call
of |
class |
character. Available anchor classes are the
|
select |
character. Several anchor selection strategies are
available: |
length |
integer. It pre-defines a maximum anchor length.
Per default, the |
range |
numeric vector of length 2. The first element is
the percentage of first anchor candidates to be excluded for
consideration when the |
formula |
formula of type |
data |
a data frame containing the variables of the specified
|
subset |
logical expression indicating elements or rows to keep: missing values are taken as false. |
na.action |
a function which indicates what should happen when the data
contain missing values ( |
weights |
an optional vector of weights (interpreted as case weights). |
model |
an IRT model fitting function with a suitable |
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
, defaulting to a length of one.
In contrast, 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. (2015a).
In more recent work Strobl et al. (2021) suggest a simpler yet powerful
anchor method based on inequality criteria like the Gini coefficient. A
similar approach based on the component loss function (CLF) was suggested
by Muthén & Asparouhov (2014). These criteria can be shown to attain their
optimium for a single-anchor, thus correponding to a constant
class of
length
1. Due to the simple structure in combination with good
empirical performance the Gini-based selection was made the default in
version 0.7-0 of the package.
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 c_j
for item j
from the different
anchor selection strategies are provided in the following equations:
d_j
denotes the difference of the item parameters,
t_j
the corresponding test statistic, and
p_j
the resulting p-values. In all cases, the anchor items
are given in parentheses. Furthermore,
\mathrm{Gini}(\cdot)
denotes the Gini inequality index,
\mathrm{CLF}(\cdot)
the component loss function (sum of square root values),
1(\cdot)
the indicator function,
\lceil 0.5\cdot k \rceil
the empirical 50% quantile,
and A_\mathrm{purified}
the anchor after purification steps.
More detailed descriptions are available in Strobl et al. (2021) and
Kopf et al. (2015b).
Gini selection (of item parameter differences) by Strobl et al. (2021):
c_j^\mathrm{Gini} = - \mathrm{Gini} (\{ |d_1(j)|, \ldots, |d_k(j)| \})
GiniT selection (of test statistics) similar to Strobl et al. (2021):
c_j^\mathrm{GiniT} = - \mathrm{Gini} (\{ |t_1(j)|, \ldots, |t_k(j)| \})
CLF selection (of item parameter differences) by Muthén & Asparouhov (2014):
c_j^\mathrm{CLF} = \mathrm{CLF} (\{ |d_1(j)|, \ldots, |d_k(j)| \})
CLFT selection (of test statistics) similar to Muthén & Asparouhov (2014):
c_j^\mathrm{CLFT} = \mathrm{CLF} (\{ |t_1(j)|, \ldots, |t_k(j)| \})
All-other selection by Woods (2009), here abbreviated AO:
c_j^\mathrm{AO} = | t_j (\{1,\ldots,k\}\setminus j) |
All-other purified selection by Wang et al. (2012), here abbreviated AOP:
c_j^\mathrm{AOP} = | t_j ( A_\mathrm{purified} ) |
Number of significant threshold selection based on Wang et al. (2004), here abbreviated NST:
c_j^\mathrm{NST} = \sum_{l \in \{1,\ldots,k\} \setminus j} 1 \left\{ p_j ( \{l\} ) \leq \alpha \right\}) |
Mean test statistic selection by Shih et al. (2009), here abbreviated MT:
c_j^\mathrm{MT} = \frac{1}{k-1} \sum_{l \in \{1,\ldots,k\} \setminus j} \left| t_j ( \{l\}) \right|
Mean p-value selection by Kopf et al. (2015b), here abbreviated MP:
c_j^\mathrm{MP} = - \frac{1}{k-1} \sum_{l \in \{1,\ldots,k\} \setminus j} p_j ( \{l\} )
Mean test statistic threshold selection by Kopf et al. (2015b), here abbreviated MTT:
c_j^\mathrm{MTT} =
\sum_{l \in \{1,\ldots,k\} \setminus j}
1 \left\{ \left| t_j ( \{l\} ) \right| >
\left( \left| \frac{1}{k-1} \sum_{l \in \{ 1, \ldots, k \} \setminus j}
t_j ( \{l\} ) \right|
\right)_{\left( \lceil 0.5\cdot k\rceil \right)}
\right\}
Mean p-value threshold selection by Kopf et al. (2015b), here abbreviated MPT:
c_j^\mathrm{MPT} =
- \sum_{l \in \{1,\ldots,k\} \setminus j}
1 \left\{ p_j ( \{l\} ) > \left(
\frac{1}{k-1} \sum_{l \in \{ 1, \ldots, k \} \setminus 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.
An object of class anchor
, i.e. a list including
anchor_items |
the integer index for the selected anchor items |
ranking_order |
a ranking order (integer index) of the candidate anchor items by their criterion values |
criteria |
the criterion values obtained in the anchor selection for each item (unsorted) |
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. \Sexpr[results=rd]{tools:::Rd_expr_doi("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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1177/0013164414529792")}
Muthén B, Asparouhov T (2014). IRT Studies of Many Groups: The Alignment Method. Frontiers in Psychology, 5, 978. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3389/fpsyg.2014.00978")}
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.
Strobl C, Kopf J, Kohler L, von Oertzen T, Zeileis A (2021). Anchor Point Selection: Scale Alignment Based on an Inequality Criterion. Applied Psychological Measurement, 45(3), 214–230. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1177/0146621621990743")}
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.
anchortest
## Verbal aggression data
data("VerbalAggression", package = "psychotools")
## Gini anchor (Strobl et al. 2021) for gender DIF in the self-to-blame situations
anchor(resp2[, 1:12] ~ gender , data = VerbalAggression)
## alternatively: based on fitted raschmodel objects
raschmodels <- with(VerbalAggression, lapply(levels(gender), function(i)
raschmodel(resp2[gender == i, 1:12])))
anchor(raschmodels[[1]], raschmodels[[2]])
if(requireNamespace("multcomp")) {
## four anchor items from constant anchor class using MPT-selection (Kopf et al. 2015b)
anchor(object = raschmodels[[1]], object2 = raschmodels[[2]],
class = "constant", select = "MPT", length = 4)
## iterative forward anchor class using MTT-selection (Kopf et al. 2015b)
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))
## criteria really the same?
all.equal(fanchor$criteria, fanchor2$criteria, check.attributes = FALSE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.