0

I would like to compute the ICC for a regression model (done using lmer function), but I always get this error message:

Error in if (n.obs < n.obs.original) message("Warning, missing data were found for ", : argument is of length zero

Here is the function I used:

ICC(model1, missing = TRUE, alpha = .05,lmer = TRUE,check.keys = FALSE)

What I don't understand is that the ICC function should be able to handle missing values. This is why I have used the package "psych and not the package irr`...

Thank you very much for your help :)

slamballais
  • 3,161
  • 3
  • 18
  • 29
  • Can you provide a [minimal dataset that reproduces the error](https://stackoverflow.com/a/28481250/5805670)? Because without it, it's hard to tell what is going wrong. – slamballais May 23 '21 at 16:38
  • Also, it seems that there simply are no observations found. The line where it fails simply tests whether `n.obs < n.obs.original`. The latter is likely the number of rows of some input. The former is likely what remains. It says that the argument is of length zero, which likely means that `n.obs` is zero. Something is fishy. – slamballais May 23 '21 at 16:42
  • Oh ok thank you fro your answer. That is maybe because the output of my regression model is not a matrix nor a data frame. Do you if I can convert the output into a matrix. I found the output using the "lmer" function. – Timothé Crelier May 23 '21 at 17:06
  • 1
    Honestly, it would be a lot easier to help out if you provide a dataset that reproduces the error ;) – slamballais May 23 '21 at 17:13
  • Oh so I think i understand where the error comes from (sorry i dont even know how to provide a simple data set that ressemble the one i have ^^). So I have 4 regression models, and each of them is actually a "class 4". So I think what I need to do is create a data set for each of those models, so I need to convert those class 4 output into a data set or matrix. Do you know how to do that ? :) thank's a lot for your help!! – Timothé Crelier May 23 '21 at 17:23

0 Answers0