icc(n, y, data, method = c("REML", "ML"), R = NULL)N = number
of clusters, n = number of subjects, y = number of cases.lme (package R is not null, a MC confidence interval
of $\rho$ is computed assuming that $\nu \sim N(\nu, Var[\nu])$,
where $Var[\nu]$ is the matrix apVar provided in the lme output.
For the ANOVA method, see Donner (1989), Searle et al. (1992) or Zou and Donner (2004).
The function assumes an homogeneous proportion $p$ across the clusters.icc-class, lme
icc in the contributed packages data(rats)
icc(n, y, rats[rats$group == "CTRL", ])
res <- icc(n, y, rats[rats$group == "TREAT", ], R = 5000)
res
hist(res@rho.MC)
by(rats,
list(group = rats$group),
function(x) icc(n, y, data = x))Run the code above in your browser using DataLab