terminal {frailtypack}R Documentation

Identify terminal indicator

Description

This is a special function used in the context of recurrent event models with terminal event (e.g., censoring variable related to recurrent events). It contains the status indicator, normally 0=alive, 1=dead, and is used on the right hand side of a formula of a 'frailtyPenal' object. Using terminal() in a formula implies that a joint frailty model for recurrent events and terminal events is fitted.

Usage

terminal(x)

Arguments

x A numeric variable but should be a Boolean which equals 1 if the subject is dead and 0 if he is alive or censored, as a death indicator.

Value

x a death indicator

See Also

frailtyPenal for Joint frailty models, plot.jointPenal, print.jointPenal, summary.jointPenal

Examples


## Not run: 

  data(dataJoint)

  modJoint<-frailtyPenal(Surv(time.entry,time.end,status)~cluster(id)+var1+var2
                         +terminal(status.terminal),
                         formula.terminalEvent=~var1,
                         data=dataJoint,n.knots=7,Frailty=TRUE,
                         kappa1=1, kappa2=1, joint=TRUE, recurrentAG=TRUE)
    
  print(modJoint)
## End(Not run)


[Package frailtypack version 2.2-12 Index]