Learn R Programming

frailtypack (version 3.6.5)

cluster: Identify clusters

Description

This is a special function used in the context of the models for grouped data. It identifies correlated groups of observations defined by using 'cluster' function, and is used of 'frailtyPenal' formula for fitting univariate and joint models.

Usage

cluster(x)

Value

x

A variable identified as a cluster

Arguments

x

A character, factor, or numeric variable which is supposed to indicate the variable group

See Also

frailtyPenal

Examples

Run this code


# \donttest{

data(readmission)
modSha <- frailtyPenal(Surv(time,event)~as.factor(dukes)+cluster(id),
n.knots=10,kappa=10000,data=readmission,hazard="Splines")

print(modSha)

# }


Run the code above in your browser using DataLab