select significant residuals only

67 views
Skip to first unread message

Tina Zorgt

unread,
Jun 19, 2020, 6:01:31 AM6/19/20
to mirt-package
Hello,

The residuals function returns a very large matrix even when I use supress (giving na values for anything not suppressed)

 residuals(model, type = "Q3",suppress = .20)

How can I get on output with only those residuals  that meet my criteria? The current matrix is too large to oversee it all.

cheers, T

Tina Zorgt

unread,
Jun 22, 2020, 4:57:14 AM6/22/20
to mirt-package
I have a work around but I'd hoped on a more friendly solution

residuals_Yen <- residuals(model, type = "Q3")
findCorrelation(residuals_Yen, cutoff = 0.20, names=TRUE, verbose = TRUE) # flagged colnames included, package Caret
rownames(residuals_Yen) # check rownames

Then I can look the correlations up by han by combinding all info




Op vrijdag 19 juni 2020 12:01:31 UTC+2 schreef Tina Zorgt:

Tina Zorgt

unread,
Jun 22, 2020, 7:40:33 AM6/22/20
to mirt-package
A bit quicker:

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





Op maandag 22 juni 2020 10:57:14 UTC+2 schreef Tina Zorgt:

Phil Chalmers

unread,
Jun 29, 2020, 12:00:13 PM6/29/20
to Tina Zorgt, mirt-package
Do you still need help with this task, or have you worked out a reasonable coding solution?

Phil


--
You received this message because you are subscribed to the Google Groups "mirt-package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mirt-package...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mirt-package/3cdff179-0ff3-48e3-90de-ae7610c8ed55o%40googlegroups.com.

Guido

unread,
Jul 2, 2020, 3:15:47 AM7/2/20
to mirt-package
Phil,

I think I have a reasonable coding solution now.

Thx!
To unsubscribe from this group and stop receiving emails from it, send an email to mirt-p...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages