cluster

0th

Percentile

Identify clusters.

This is a special function used in the context of survival models. It identifies correlated groups of observations, and is used on the right hand side of a formula. Using cluster() in a formula implies that robust sandwich variance estimators are desired.

Keywords
survival
Usage
cluster(x)
Arguments
x

A character, factor, or numeric variable.

Details

The function's only action is semantic, to mark a variable as the cluster indicator. The resulting variance is what is known as the ``working independence'' variance in a GEE model. Note that one cannot use both a frailty term and a cluster term in the same model, the first is a mixed-effects approach to correlation and the second a GEE approach, and these don't mix.

Value

x

See Also

coxph, survreg

Aliases
  • cluster
Examples
# NOT RUN {
marginal.model <- coxph(Surv(time, status) ~ rx + cluster(litter), rats,
                         subset=(sex=='f'))
frailty.model  <- coxph(Surv(time, status) ~ rx + frailty(litter), rats,
                         subset=(sex=='f'))
# }
Documentation reproduced from package survival, version 2.44-1.1, License: LGPL (>= 2)

Community examples

Looks like there are no examples yet.