mantelHaenszel {difR} | R Documentation |
Calculates the Mantel-Haenszel statistics for DIF detection.
mantelHaenszel(data, member, correct=TRUE, anchor=1:ncol(data))
data |
numeric: the data matrix (one row per subject, one column per item). |
member |
numeric: the vector of group membership with zero and one entries only. See Details. |
correct |
logical: should the continuity correction be used? (default is TRUE). |
anchor |
a vector of integer values specifying which items (all by default) are currently considered as anchor (DIF free) items. See Details. |
This command computes the Mantel-Haenszel (1959) statistic in the specific framework of differential item functioning. It forms the basic command
of difMH
and is specifically designed for this call.
The data are passed through the data
argument, with one row per subject and one column per item. Missing values are not allowed.
The vector of group membership, specified with member
argument, must hold only zeros and ones, a value of zero corresponding to the
reference group and a value of one to the focal group.
By default, the continuity correction factor -0.5 is used (Holland and Thayer, 1988). One can nevertheless remove it by specifying correct=FALSE
.
Option anchor
sets the items which are considered as anchor items for computing Mantel-Haenszel statistics. Items other than the anchor items and the tested item
are discarded. anchor
must hold integer values specifying the column numbers of the corresponding anchor items. It is primarily designed to perform item purification.
A vector with the values of the Mantel-Haenszel DIF statistics.
Sebastien Beland
Centre sur les Applications des Modeles de Reponses aux Items (CAMRI)
Universite du Quebec a Montreal
sebastien.beland.1@hotmail.com
David Magis
Research Group of Quantitative Psychology and Individual Differences
Katholieke Universiteit Leuven
David.Magis@psy.kuleuven.be, http://ppw.kuleuven.be/okp/home/
Gilles Raiche
Centre sur les Applications des Modeles de Reponses aux Items (CAMRI)
Universite du Quebec a Montreal
raiche.gilles@uqam.ca, http://www.er.uqam.ca/nobel/r17165/
Holland, P. W. and Thayer, D. T. (1988). Differential item performance and the Mantel-Haenszel procedure. In H. Wainer and H. I. Braun (Ed.), Test validity. Hillsdale, New Jersey: Lawrence Erlbaum Associates.
Mantel, N. and Haenszel, W. (1959). Statistical aspects of the analysis of data from retrospective studies of disease. Journal of the National Cancer Institute, 22, 719-748.
# Loading of the verbal data data(verbal) # With and without continuity correction mantelHaenszel(verbal[,1:23], verbal[,25]) mantelHaenszel(verbal[,1:23], verbal[,25],correct=FALSE) # Removing item 6 from the set of anchor items mantelHaenszel(verbal[,1:24], verbal[,26], anchor=c(1:5,7:24))