icc(n, y, data, method = c("REML", "ML"), R = NULL)
N
= number
of clusters, n
= number of subjects, y
= number of cases.lme
(package apVar
provided in the lme
output).
If the argument R
is not null, a MC confidence interval of $\rho$ is computed assuming
that $\nu \sim N(\nu, Var[\nu])$.
For the ANOVA method, moments estimates of the variance components are used.
See Donner (1989), Searle et al. (1992) or Zou and Donner (2004).
A $F$ test is provided to assess whether $\rho = 0$ (actually, whether
$\sigma_u^2 = 0$: see Searle et al, 1992, p. 76).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