Learn R Programming

survival (version 2.11-4)

cluster: Identify Clusters

Description

This is a special function used in the context of the Cox model. It identifies correlated groups of observations, and is used on the right hand side of a formula.

Usage

cluster(x)

Arguments

x
A character, factor, or numeric variable.

Value

  • x

Details

The function's only action is semantic, to mark a variable as the cluster indicator.

See Also

coxph, Surv

Examples

Run this code
coxph(Surv(futime, fustat) ~ age + cluster(group), data = ovarian)

Run the code above in your browser using DataLab