Q {pairwise} | R Documentation |
function for calculating the person fit index Q, which was proposed by Tarnai and Rost (1990).
Q(obj = NULL, data = NULL, threshold = NULL, ...)
obj |
an object of class |
data |
optional response data when object of class |
threshold |
optional in case that object of class |
... |
not used so far. |
The person Q-index proposed by Tarnai and Rost, (1990) is solely based on the empirical responses and the item parameters. Thus the computation of person parameters using the function pers
is not required - see examples. But for convenience return objects of both functions are accepted in function Q
.
a vector holding the Q-index for every person.
Tarnai, C., & Rost, J. (1990). Identifying aberrant response patterns in the Rasch model: the Q index. Münster: ISF.
####################### data(bfiN) # get some data ip <- pair(daten = bfiN,m = 6) # item parameters according the partial credit model Q(ip) ### with data an thresholds as external objects ##### threshold <- matrix(seq(-3,3,length.out = 9),ncol = 3) dimnames(threshold) <- list(c("I1","I2","I3"),c("1","2","2")) threshold resp_vec <- c(3,0,2,1,2,2,2,2,1,3,0,NA,NA,0,2,3,NA,2,NA,2,1,2,NA,1,2,2,NA) resp_emp <- matrix(resp_vec,ncol = 3,byrow = TRUE) colnames(resp_emp) <- c("I1","I2","I3") resp_emp Qindex <- Q(data = resp_emp,threshold = threshold) cbind(resp_emp,Qindex) #### unequal number of thresholds ################### threshold <- matrix(seq(-3,3,length.out = 9),ncol = 3) dimnames(threshold) <- list(c("I1","I2","I3"),c("1","2","2")) threshold[2,3] <- NA resp_vec <- c(3,0,2,1,2,2,2,2,1,3,0,NA,NA,0,2,3,NA,2,NA,2,1,2,NA,1,2,2,NA) resp_emp <- matrix(resp_vec,ncol = 3,byrow = TRUE) colnames(resp_emp) <- c("I1","I2","I3") resp_emp Qindex <- Q(data = resp_emp,threshold = threshold) cbind(resp_emp,Qindex)