Home > Mobile >  ICC unused argument
ICC unused argument

Time:12-18

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!

CodePudding user response:

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")
  •  Tags:  
  • r
  • Related