plot.jointPenal {frailtypack} | R Documentation |
Plots estimated baseline survival and hazard functions of a joint frailty model (output from an object of class 'frailtyPenal' for joint frailty models ) for each type of event (terminal or recurrent). Confidence bands are allowed.
## S3 method for class 'jointPenal': plot(x, event = "both", type.plot = "hazard", conf.bands = FALSE, ...)
x |
A joint model, or more generaly an object of class frailyPenal for Joint frailty model (output from calling frailtyPenal
function). |
event |
a character string specifying the type of curve. Possible value are "terminal", "recurrent", or "both". The default is "both". |
type.plot |
a character string specifying the type of curve. Possible value are "hazard", or "survival". The default is "hazard". Only the first words are required, e.g "haz", "su" |
conf.bands |
logical value. Determines whether confidence bands will be plotted. The default is to do so. |
... |
Other graphical parameters |
Print a plot of the baseline survival or hazard functions for each type of event or both with the confidence bands or not (conf.bands argument)
print.jointPenal
,summary.jointPenal
,frailtyPenal for Joint frailty models
## Not run: data(readmission) ## Gap-time ## modJoint_gap<-frailtyPenal(Surv(time,event)~cluster(id)+sex+as.factor(dukes) +as.factor(charlson)+terminal(death), formula.terminalEvent=~sex+as.factor(dukes)+as.factor(charlson), data=readmission,n.knots=14,kappa1=9550000000, kappa2=1410000000000,Frailty=TRUE,joint=TRUE,recurrentAG=FALSE) # It takes around 1 minute to converge. # plot(modJoint_gap,type.plot="haz",event="recurrent",conf.bands=TRUE) plot(modJoint_gap,type.plot="haz",event="terminal",conf.bands=TRUE) plot(modJoint_gap,type.plot="haz",event="both",conf.bands=TRUE)) plot(modJoint_gap,type.plot="su",event="recurrent",conf.bands=TRUE)) plot(modJoint_gap,type.plot="su",event="terminal",conf.bands=TRUE)) plot(modJoint_gap, event="terminal",type.plot="su",conf.bands=TRUE)) plot(modJoint_gap,type.plot="su","terminal",conf.bands=TRUE)) ## End(Not run)