Learn R Programming

frailtypack (version 2.7.1)

subcluster: Identify subclusters

Description

This is a special function used in the context of survival nested models. It identifies correlated groups of observations within other groups defined by using 'cluster' function from 'survival' package, and is used on the right hand side of 'frailtyPenal' formula for fitting a nested model. Using subcluster() in a formula implies that a nested frailty model is estimated.

Usage

subcluster(x)

Arguments

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

Value

  • xA variable identified as a subcluster

See Also

frailtyPenal

Examples

Run this code
data(dataNested)
modClu <- frailtyPenal(Surv(t1,t2,event)~cluster(group)+
subcluster(subgroup)+cov1+cov2,data=dataNested,
n.knots=8,kappa=c(50000,50000),hazard="Splines")

print(modClu)

Run the code above in your browser using DataLab