# creates a small data frames with 4 subject's scores for 5 measures:
dta <- data.frame(cbind(
clus <- c(1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3),
col1 <- c(2, 4, 4, 6, 4, 5, 8, 8, 5, 8, 9, 9)
))
ShroutFleissICC1(dta, 1, 2)
# 0.434343434
ShroutFleissICC11(dta[, 1], dta[,2])
# 0.434343434
dta2 <- data.frame(cbind(
clus <- c(1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3),
col1 <- c(1, 3, 3, 5, 3, 4, 7, 7, 4, 7, 8, 8),
col1 <- c(2, 4, 4, 6, 4, 5, 8, 8, 5, 8, 9, 9),
col1 <- c(3, 5, 5, 7, 5, 6, 9, 9, 6, 9, 10, 10)
))
ShroutFleissICC1(dta2, 1, 2:4)
# 0.7543859649
ShroutFleissICC1k(dta2[, 1], dta2[,2:4])
# 0.7543859649
Run the code above in your browser using DataLab