Description Usage Arguments Details Value Author(s) References See Also Examples

This function compares the specified DIF detection methods among multiple groups, with respect to the detected items.

1 2 3 4 5 6 7 8 | ```
genDichoDif(Data, group, focal.names, method, anchor = NULL, match = "score",
type = "both", criterion = "LRT", alpha = 0.05, model = "2PL", c = NULL,
engine = "ltm", discr = 1, irtParam = NULL, nrFocal = 2, same.scale = TRUE,
purify = FALSE, nrIter = 10, p.adjust.method = NULL, save.output = FALSE,
output = c("out", "default"))
## S3 method for class 'genDichoDif'
print(x, ...)
``` |

`Data` |
numeric: either the data matrix only, or the data matrix plus the vector of group membership. See |

`group` |
numeric or character: either the vector of group membership or the column indicator (within data) of group membership. See |

`focal.names` |
numeric or character vector indicating the levels of |

`method` |
character: the name of the selected methods. See |

`anchor` |
either |

`match` |
specifies the type of matching criterion. Can be either |

`type` |
a character string specifying which DIF effects must be tested (default is |

`criterion` |
character: the type of test statistic used to detect DIF items with generalized logistic regression. Possible values are |

`alpha` |
numeric: significance level (default is 0.05). |

`model` |
character: the IRT model to be fitted (either |

`c` |
optional numeric value or vector giving the values of the constrained pseudo-guessing parameters. See |

`engine` |
character: the engine for estimating the 1PL model, either |

`discr` |
either |

`irtParam` |
matrix with |

`nrFocal` |
numeric: the number of focal groups (default is 2). |

`same.scale` |
logical: are the item parameters of the |

`purify` |
logical: should the method be used iteratively to purify the set of anchor items? (default is FALSE). |

`nrIter` |
numeric: the maximal number of iterations in the item purification process (default is 10). |

`p.adjust.method` |
either |

`save.output` |
logical: should the output be saved into a text file? (Default is |

`output` |
character: a vector of two components. The first component is the name of the output file, the second component is either the file path or |

`x` |
result from a |

`...` |
other generic parameters for the |

`genDichoDif`

is a generic function which calls one or several DIF detection methods among multiple groups, and summarize their output. The possible methods are: `"GMH"`

for Generalized Mantel-Haenszel (Penfield, 2001), `"genLogistic"`

for generalized logistic regression (Magis, Raiche Beland and Gerard, 2011) and `"genLord"`

for generalized Lord's chi-square test (Kim, Cohen and Park, 1995).

If `method`

has a single component, the output of `genDichoDif`

is exactly the one provided by the method itself. Otherwise, the main output is a matrix with one row per item and one column per method. For each specified method and related arguments, items detected as DIF and non-DIF are respectively encoded as `"DIF"`

and `"NoDIF"`

. When printing the output an additional column is added, counting the number of times each item was detected as functioning differently (Note: this is just an informative summary, since the methods are obviously not independent for the detection of DIF items).

The `Data`

is a matrix whose rows correspond to the subjects and columns to the items. 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)`

.

Missing values are allowed for item responses (not for group membership) but must be coded as `NA`

values. They are discarded from either the computation of the sum-scores, the fitting of the logistic models or the IRT models (according to the method).

The vector of group membership must hold at least three different values, either as numeric or character. The focal groups are defined by the values of the argument `focal.names`

.

For generalized Mantel-Haenszel and generalized logistic methods, the matching criterion can be either the test score or any other continuous or discrete variable to be passed in the DIF function. This is specified by the `match`

argument. By default, it takes the value `"score"`

and the test score (i.e. raw score) is computed. The second option is to assign to `match`

a vector of continuous or discrete numeric values, which acts as the matching criterion. Note that for consistency this vector should not belong to the `Data`

matrix.

For the generalized logistic regression method, the argument `type`

permits to test either both uniform and nonuniform effects simultaneously (with `type="both"`

), only uniform DIF effect (with `type="udif"`

) or only nonuniform DIF effect (with `type="nudif"`

). Furthermore, the argument `criterion`

defines which test must be used, either the Wald test (`"Wald"`

) or the likelihood ratio test (`"LRT"`

). See `difGenLord`

for further details.

For generalized Lord method, one can specify either the IRT model to be fitted (by means of `model`

, `c`

, `engine`

and `discr`

arguments), or the item parameter estimates with arguments `irtParam`

and `same.scale`

. See `difGenLord`

for further details.

The threshold for detecting DIF items depends on the method and is depending on the significance level set by `alpha`

.

Item purification can be requested by specifying `purify`

option to `TRUE`

. Recall that item purification process is slightly different for IRT and for non-IRT based methods. See the corresponding methods for further information.

Adjustment for multiple comparisons is possible with the argument `p.adjust.method`

. See the corresponding methods for further information.

A pre-specified set of anchor items can be provided through the `anchor`

argument. For non-IRT methods, anchor items are used to compute the test score (as matching criterion). For IRT methods, anchor items are used to rescale the item parameters on a common metric. See the corresponding methods for further information.

The output of the `genDichoDif`

function can be stored in a text file by fixing `save.output`

and `output`

appropriately. See the help file of `selectGenDif`

function (or any other DIF method) for further information.

Either the output of one of the DIF detection methods, or a list of class "genDichoDif" with the following arguments:

`DIF` |
a character matrix with one row per item and whose columns refer to the different specified detection methods. See |

`alpha` |
the significance level |

`method` |
the value of |

`match` |
the value of |

`type` |
the value of |

`criterion` |
the value of the |

`model` |
the value of |

`c` |
the value of |

`engine` |
The value of the |

`discr` |
the value of the |

`irtParam` |
the value of |

`same.scale` |
the value of |

`p.adjust.method` |
the value of the |

`purification` |
the value of |

`nrPur` |
an integer vector (of length equal to the number of methods) with the number of iterations in the purification process. Returned only if |

`convergence` |
a logical vector (of length equal to the number of methods) indicating whether the iterative purification process converged. Returned only if |

`anchor.names` |
the value of the |

`save.output` |
the value of the |

`output` |
the value of the |

Sebastien Beland

Collectif pour le Developpement et les Applications en Mesure et Evaluation (Cdame)

Universite du Quebec a Montreal

sebastien.beland.1@hotmail.com, http://www.cdame.uqam.ca/

David Magis

Department of Psychology, University of Liege

Research Group of Quantitative Psychology and Individual Differences, KU Leuven

David.Magis@uliege.be, http://ppw.kuleuven.be/okp/home/

Gilles Raiche

Collectif pour le Developpement et les Applications en Mesure et Evaluation (Cdame)

Universite du Quebec a Montreal

raiche.gilles@uqam.ca, http://www.cdame.uqam.ca/

Kim, S.-H., Cohen, A.S. and Park, T.-H. (1995). Detection of differential item functioning in multiple groups. *Journal of Educational Measurement, 32*, 261-276. doi: 10.1111/j.1745-3984.1995.tb00466.x

Magis, D., Beland, S., Tuerlinckx, F. and De Boeck, P. (2010). A general framework and an R package for the detection
of dichotomous differential item functioning. *Behavior Research Methods, 42*, 847-862. doi: 10.3758/BRM.42.3.847

Magis, D., Raiche, G., Beland, S. and Gerard, P. (2011). A logistic regression procedure to detect differential item functioning among multiple groups. *International Journal of Testing, 11*, 365–386. doi: 10.1080/15305058.2011.602810

Penfield, R. D. (2001). Assessing differential item functioning among multiple groups: a comparison of three Mantel-Haenszel procedures. *Applied Measurement in Education, 14*, 235-259. doi: 10.1207/S15324818AME1403_3

`difGMH`

, `difGenLogistic`

, `difGenLord`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ```
## Not run:
# Loading of the verbal data
data(verbal)
attach(verbal)
# Creating four groups according to gender ("Man" or "Woman") and trait
# anger score ("Low" or "High")
group <- rep("WomanLow", nrow(verbal))
group[Anger>20 & Gender==0] <- "WomanHigh"
group[Anger<=20 & Gender==1] <- "ManLow"
group[Anger>20 & Gender==1] <- "ManHigh"
# New data set
Verbal <- cbind(verbal[,1:24], group)
# Reference group: "WomanLow"
names <- c("WomanHigh", "ManLow", "ManHigh")
# Comparing the three available methods
# with item purification
genDichoDif(Verbal, group = 25, focal.names = names, method = c("GMH", "genLogistic",
"genLord"), purify = TRUE)
# Same analysis, but saving the output into the 'genDicho' file
genDichoDif(Verbal, group = 25, focal.names = names, method = c("GMH", "genLogistic",
"genLord"), purify = TRUE, save.output = TRUE,
output = c("genDicho", "default"))
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.