# loading libraries
library(difR)
# loading data based on GMAT
data(GMAT, package = "difNLR")
Data <- GMAT[, 1:20]
group <- GMAT[, 21]
# DIF detection using difLogistic() function
x <- difLogistic(Data, group, focal.name = 1)
# Characteristic curve by logistic regression model
plotDIFLogistic(x, item = 1, Data = Data, group = group)
# Using name of column as item identifier
plotDIFLogistic(x, item = "Item1", Data = Data, group = group)
# Renaming reference and focal group
plotDIFLogistic(x, item = 1, group.names = c("Group 1", "Group 2"), Data = Data, group = group)
# Not plotting empirical probabilities
plotDIFLogistic(x, item = 1, draw.empirical = FALSE)
Run the code above in your browser using DataLab