plotDIFirt( parameters, test ="Lord", item ="all", item.name, same.scale =FALSE)
Arguments
parameters: numeric: data matrix or data frame. See Details .
test: character: type of statistic to be shown. See Details .
item: either character ("all"), or numeric vector, or single number corresponding to column indicators. See Details .
item.name: character: the name of item.
same.scale: logical: are the item parameters on the same scale? (default is "FALSE"). See Details .
Details
This function plots characteristic curve of DIF IRT model.
The parameters matrix has a number of rows equal to twice the number of items in the data set. The first J rows refer to the item parameter estimates in the reference group, while the last J ones correspond to the same items in the focal group. The number of columns depends on the selected IRT model: 2 for the 1PL model, 5 for the 2PL model, 6 for the constrained 3PL model and 9 for the unconstrained 3PL model. The columns of irtParam() have to follow the same structure as the output of itemParEst(), difLord() or difRaju() command from the difR package.
Two possible type of test statistics can be visualized - "Lord"
gives only characteristic curves, "Raju" also highlights area between these curves.
For default option "all", all characteristic curves are plotted.
Examples
# loading librarieslibrary(difR)library(ltm)# loading data based on GMAT2data(GMAT2, package ="difNLR")# Estimation of 2PL IRT model and Lord's statistic# by difR packagefitLord <- difLord(GMAT2, group =21, focal.name =1, model ="2PL")# plot of item 1 and Lord's statisticplotDIFirt(fitLord$itemParInit, item =1)# Estimation of 2PL IRT model and Raju's statistic# by difR packagefitRaju <- difRaju(GMAT2, group =21, focal.name =1, model ="2PL")# plot of item 1 and Lord's statisticplotDIFirt(fitRaju$itemParInit, test ="Raju", item =1)