Learn R Programming

aod (version 1.1-35)

icc: Intra-Cluster Correlation for Binomial Data

Description

This function computes approximate estimates of the intra-cluster correlation $\rho$ from clustered, binomial data ${(n_1, y_1), (n_2, y_2), ..., (n_K, y_K)}$ (with $K$ the number of clusters), using a 1-way linear random effect model for continuous variables. Both ML/REML and ANOVA estimates are provided.

Usage

icc(n, y, data, method = c("REML", "ML"), R = NULL)

Arguments

n
Vector of the denominators of the proportions.
y
Vector of the numerators of the proportions.
data
A data frame containing the variables n and y.
method
A character string ML (maximum likelihood) or REML (restricted ML) used in the ML/REML estimation method for $\rho$. Default to REML.
R
A scalar indicating the number of Monte Carlo (MC) replicates used to estimate the confidence interval of $\rho$ for ML/REML estimates. When R is NULL (default), the MC confidence interval is not computed.

Value

  • An object of formal class icc, with 7 slots:
  • CALLThe call of the function.
  • rhoA numeric vector with 2 components: REML (or ML) and ANOVA, containing the estimated values of $\rho$ according to these 2 methods.
  • varrhoA numeric scalar giving the approximate variance of $\rho$ (ML/REML estimate) estimated with the Delta method.
  • fA numeric vector with the results of the $F$ test.
  • rho.MCA numeric vector with the MC replicates of $\rho$.
  • methodA character string taking values ML or REML.
  • featuresA numeric vector with 3 components summarizing the main features of the data: N = number of clusters, n = number of subjects, y = number of cases.

Details

The function assumes an homogeneous proportion $p$ across the clusters. Clustered data are split into binary (0/1) observations $y_{ij}$ (obs. $j$ in cluster $i$). A linear 1-way random effect model representing these binary data is defined as: $$y_{ij} = \mu + u_i + e_{ij}$$ where $\mu$ is the general mean, $a_i$ is the random cluster effect and $e_{ij}$ is the residual error. Model assumptions are: $u \sim N(0, \sigma_u^2)$ and $e_{ij} \sim N(0, \sigma_e^2)$. The intra-cluster correlation is computed as $$\rho = \sigma_u^2 / (\sigma_u^2 + \sigma_e^2)$$. Variances components $\sigma_u^2$ and $\sigma_e^2$ are estimated using ML/REML and (moments) ANOVA methods. For the ML/REML method, variance components (actually, vector $\nu = log(\sigma_u, \sigma_e)$) are estimated with the function lme (package nlme): see Pinheiro and Bates, 2000. An approximate variance of $\rho$ is computed with the Delta method from the estimated $Var[\nu]$ (= matrix 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).

References

Donner, A., 1989. Statistical methods in ophthalmology: an adjusted chi-squared approach. Biometrics 45, 605-611. Pinheiro, J.C., Bates, D.M., 2000. Mixed-effects models in S and S-PLUS. Springer-Verlag, New York. Searle, S.R., Casella, G., McCulloch, C.E., 1992. Variance components. Wiley, New York. Zou, G., Donner, A., 2004. Confidence interval estimation of the intraclass correlation coefficient for binary outcome data. Biometrics 60, 807-811.

See Also

icc-class, lme icc in the contributed packages irr and psy.

Examples

Run this code
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