selectGenDif {difR} | R Documentation |

This function performs DIF detection among multiple groups for one pre-specified method.

selectGenDif(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"))

`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 method. See |

`anchor` |
either |

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

`type` |
a character string specifying which DIF effects must be tested. Possible values are |

`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 |

This is a generic function which calls one of the DIF detection methods for multiple groups, and displays its output. It is mainly used as a routine for `genDichoDif`

command.

There are three possible methods currently implemented: `"GMH"`

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

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

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

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 `"GMH"`

and `"genLogistic"`

methods, the matching criterion can be either the test score or any other continuous or discrete variable to be passed in the selected 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"`

).

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`

, `nrFocal`

and `same.scale`

. Moreover, the matching criterion can be either the test score or any other continuous or discrete variable to be passed in the `Logistik`

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. 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 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 selected method can be stored in a text file by fixing `save.output`

and `output`

appropriately. See the help file of the corresponding method for further information.

The output of the selected DIF detection method.

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`

## 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") # Calling generalized Mantel-Haenszel selectGenDif(Verbal, group = 25, focal.names = names, method = "GMH") # Calling generalized Mantel-Haenszel and saving output in 'GMH.txt' file selectGenDif(Verbal, group = 25, focal.name = names, method = "GMH", save.output = TRUE, output = c("GMH", "default")) # Calling generalized logistic regression selectGenDif(Verbal, group = 25, focal.names = names, method = "genLogistic") # Calling generalized Lord method (2PL model) selectGenDif(Verbal, group = 25, focal.names = names, method = "genLord", model = "2PL") ## End(Not run)

[Package *difR* version 5.1 Index]