Learn R Programming

aod (version 1.3.3)

iccbin: Intra-Cluster Correlation for Binomial Data

Description

This function calculates point estimates of the intraclass 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 random effect model. Three estimates, following methods referred to as “A”, “B” and “C” in Goldstein et al. (2002), can be obtained.

Usage

iccbin(n, y, data, method = c("A", "B", "C"), nAGQ = 1, M = 1000)

Value

An object of formal class “iccbin”, with 3 slots:

CALL

The call of the function.

features

A character vector summarizing the main features of the method used.

rho

The point estimate of the intraclass correlation \(\rho\).

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 (“A”, “B” or “C”) defining the calculation method. See Details.

nAGQ

Same as in function glmer of package lme4. Only for methods “A” and “B”. Default to 1.

M

Number of Monte Carlo (MC) replicates used in method “B”. Default to 1000.

Author

Matthieu Lesnoff matthieu.lesnoff@cirad.fr, Renaud Lancelot renaud.lancelot@cirad.fr

Details

Before computations, the clustered data are split into binary (0/1) observations \(y_{ij}\) (obs. \(j\) in cluster \(i\)). The calculation methods are described in Goldstein et al. (2002). Methods "A" and "B" assume a 1-way generalized linear mixed model, and method "C" a 1-way linear mixed model.
For "A" and "B", function iccbin uses the logistic binomial-Gaussian model: $$y_{ij} | p_{ij} \sim Bernoulli(p_{ij}),$$ $$logit(p_{ij}) = b_0 + u_i,$$ where \(b_0\) is a constant and \(u_i\) a cluster random effect with \(u_i \sim N(0, s^2_u)\). The ML estimate of the variance component \(s^2_u\) is calculated with the function glmer of package lme4. The intra-class correlation \(\rho = Corr[y_{ij}, y_{ij'}]\) is then calculated with a first-order model linearization around \(E[u_i]=0\) in method “A”, and with Monte Carlo simulations in method “B”.
For “C”, function iccbin provides the common ANOVA (moments) estimate of \(\rho\). For details, see for instance Donner (1986), Searle et al. (1992) or Ukoumunne (2002).

References

Donner A., 1986, A review of inference procedures for the intraclass correlation coefficient in the one-way random effects model. International Statistical Review 54, 67-82.
Searle, S.R., Casella, G., McCulloch, C.E., 1992. Variance components. Wiley, New York.
Ukoumunne, O. C., 2002. A comparison of confidence interval methods for the intraclass correlation coefficient in cluster randomized trials. Statistics in Medicine 21, 3757-3774.
Golstein, H., Browne, H., Rasbash, J., 2002. Partitioning variation in multilevel models. Understanding Statistics 1(4), 223-231.

See Also

iccbin-class, glmer

Examples

Run this code

data(rats)
tmp <- rats[rats$group == "TREAT", ]
# A: glmm (model linearization)
iccbin(n, y, data = tmp, method = "A")
iccbin(n, y, data = tmp, method = "A", nAGQ = 10)
# B: glmm (Monte Carlo)
iccbin(n, y, data = tmp, method = "B")
iccbin(n, y, data = tmp, method = "B", nAGQ = 10, M = 1500)
# C: lmm (ANOVA moments)
iccbin(n, y, data = tmp, method = "C")

  if (FALSE) {
  # Example of confidence interval calculation with nonparametric bootstrap
  require(boot)
  foo <- function(X, ind) {
    n <- X$n[ind]
    y <- X$y[ind]
    X <- data.frame(n = n, y = y)
    iccbin(n = n, y = y, data = X, method = "C")@rho[1]
    }
  res <- boot(data = tmp[, c("n", "y")], statistic = foo, R = 500, sim = "ordinary", stype = "i")
  res
  boot.ci(res, conf = 0.95, type = "basic")
  }

Run the code above in your browser using DataLab