| difLogReg {difR} | R Documentation | 
General logistic regression DIF method
Description
Performs DIF detection using logistic regression method with either two groups, more than two groups, or a continuous group variable.
Usage
difLogReg(Data, group, focal.name, anchor = NULL, group.type = "group", 
 	match = "score", type = "both", criterion = "LRT", alpha = 0.05, 
 	purify = FALSE, nrIter = 10, p.adjust.method = NULL, save.output = FALSE, 
 	output = c("out", "default"))
 
Arguments
Data | 
 numeric: either the data matrix only, or the data matrix plus the vector of group membership. See Details.  | 
group | 
 numeric or character: either the vector of group membership or the column indicator (within   | 
focal.name | 
 numeric or character indicating the level(s) of   | 
anchor | 
 either   | 
group.type | 
 character: 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 | 
 a character string specifying which DIF statistic is computed. Possible values are   | 
alpha | 
 numeric: significance level (default is 0.05).  | 
purify | 
 logical: should the method be used iteratively to purify the set of anchor items? (default is FALSE). Ignored if   | 
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 
  | 
Details
The difLogReg function is a meta-function for logistic regression DIF analysis. It encompasses all possible cases that are currently implemented in difR and makes appropriate calls to the function difLogistic or difGenLogistic. 
Three situations are embedded in this function.
The group membership is defined by two distinct groups. In this case,
group.typemust be"group"andfocal.namemust be a single value, referring to the name or label of the focal group.The group membership is defined by a finite, yet larger than two, number of groups. In this case,
group.typemust be"group"andfocal.namemust be a vector with the names or labels of all focal groups.The group membership is a continuous or discrete (but treated as continuous) variable. In this case, DIF is tested with respect to this "membership" variable. Furthermore,
group.typemust be"cont"andfocal.nameis ignored (though some value must be specified, for instanceNULL).
The specification of the data, the options for item purification, DIF statistic selection, and output saving, are identical to the options arising from the difLogistic and difGenLogistic functions. 
Value
A list of class "Logistic" (if group.type is "cont" or with the length of focal.name is one) or "genLogistic", with related arguments (see difLogistic and difGenLogistic). 
Author(s)
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/ 
 
References
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
Swaminathan, H. and Rogers, H. J. (1990). Detecting differential item functioning using logistic regression procedures. Journal of Educational Measurement, 27, 361-370. doi: 10.1111/j.1745-3984.1990.tb00754.x
See Also
difLogistic, difGenLogistic, dichoDif,  genDichoDif
Examples
## Not run: 
 # Loading of the verbal data
 data(verbal)
 attach(verbal)
 # Few examples
 difLogReg(Data=verbal[,1:24], group=verbal[,26], focal.name=1)
 difLogReg(Data = verbal[,1:24], group = verbal[,26], focal.name = 1, match = verbal[,25])
 difLogReg(Data = verbal[,1:24], group = verbal[,25], focal.name = 1, group.type = "cont")
 group<-rep("WomanLow",nrow(verbal))
 group[Anger>20 & Gender==0] <- "WomanHigh"
 group[Anger<=20 & Gender==1] <- "ManLow"
 group[Anger>20 & Gender==1] <- "ManHigh"
 names <- c("WomanHigh", "ManLow", "ManHigh")
 difLogReg(Data = verbal[,1:24], group = group, focal.name = names)
 
## End(Not run)