I have been trying to perform an icc (Intraclass Correlation Coefficient ) test for the agreement between raters in a k x m matrix. Where k are rows (subjects of study) and m are the raters. It is a 70 x 70 matrix, but it comes from randomised raters where each subject was assessed only ~6 times (range 2-13).
The subjects of study and raters do not have much overlap since groups are large.
That means that my matrix is full of NAs:
Subject___Rater1___Rater2___Rater3___Rater4___... Rater70
Subject1 ____ 3 _____ 1________NA_____NA ____ ...
Subject2_____NA ____5 _______NA______2 _____ ...
Subject3_____6 _____NA_______3 _______5_____ ...
...Subject70
I have tried the psych library finding 2 main problems:
First, not able to use na.rm (or similar) function. So, I don´t know how to deal with NAs
Second, I have not been able to define the type of test (ICC1, ICC2 or ICC3). Even if the manual and the help in R states the ICC types according to Shrout and Fleiss I cannot find an example or function for being sure of the type used.
This lines do not work:
Data_O<-na.omit(iccOTE) icc1<-icc(Data_O, na.rm=TRUE, type = c("agreement"), unit = c("single"), r0 = 0, conf.level = 0.95)
--------- So: I switched to DescTools library. This helped when using the na.rm function. I tried the following code:
ICC(Data_O, type = c("ICC1k"), conf.level = 0.95, na.rm = TRUE)
I got the following error: Error in stack.data.frame(data.frame(ratings)) : no vector columns were selected
I tried looking for the meaning of the error, but cannot find it. Also, I am a bit confused on how the library uses k. Where can I find information to understand if k is used in this example as (n-1) where k is calculated per case (row) [k=6] or generally according to the full matrix [k=70]? In the second case it would be totally inaccurate.
Thank you!!!