0

I need to calculate the 95% CI of iCC.

I'm using this code:

icc(mydata[,c(1,2)], model = "twoway",type = "agreement", unit = "average")

I obtain this error message.

Error in icc(mydata[, c(1, 1)], model = "twoway", type = "agreement",  : 
  unused arguments (model = "twoway", type = "agreement", unit = "average")

My data:

mydata= data.frame(A=c(0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 3), B=c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 2))

How can I fix it?

Thank you!

user20650
  • 24,654
  • 5
  • 56
  • 91
ArTu
  • 431
  • 4
  • 20
  • [See here](https://stackoverflow.com/q/5963269/5325862) on making a reproducible example that is easier for folks to help with. Where does `icc` come from? Have you read its documentation? – camille Dec 18 '21 at 00:59

1 Answers1

2

You might have competing packages loaded that both use icc(). The psych package and the irr package both have this as a function name. If both are loaded, the psych package is likely masking the irr command. Those are not valid arguments for psych::icc() but they are for irr::icc()

Try:

irr:: icc(mydata[,c(1,2)], model = "twoway",type = "agreement", unit = "average")
Jonni
  • 804
  • 5
  • 16
  • @ArTu: You should have seen a message at the time that the psych package got loaded. It would have warned you about masking of `icc`. One does need to pay heed to such warnings. – IRTFM Dec 18 '21 at 01:19