LI <- mirt(data, model = 1, itemtype = "graded")
residuals_Yen <- residuals(LI, type = "Q3")
# library(caret)
# flag significant correlations by a cutoff
findCorrelation(residuals_Yen, cutoff = 0.20, names=TRUE, verbose = TRUE) # flagged colnames included; names = FALSE shows positions only
# e.g.output = Compare row 2 and column 3 with corr 0.214 Means: 0.067 vs 0.068 so flagging column 3
# than the 2nd and 3th variable have a flagged correlation of 0.214
# look up the 2nd and 3th variable with rownames to identify the corresponding variable names
rownames(residuals_Yen)[c(2,3)] # example with correlated variables 2 and 3