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(dataJoint) modJoint<-frailtyPenal(Surv(time.entry,time.end,status)~cluster(id)+var1+var2 +terminal(status.terminal), formula.terminalEvent=~var1, data=dataJoint,n.knots=7, kappa1=1, kappa2=1,Frailty=TRUE, joint=TRUE, recurrentAG=TRUE) # It takes around 1 minute to converge. # plot(modJoint,type.plot="haz",event="recurrent",conf.bands=TRUE) plot(modJoint,type.plot="haz",event="terminal",conf.bands=TRUE) plot(modJoint,type.plot="haz",event="both",conf.bands=TRUE)) plot(modJoint,type.plot="su",event="recurrent",conf.bands=TRUE)) plot(modJoint,type.plot="su",event="terminal",conf.bands=TRUE)) plot(modJoint, event="terminal",type.plot="su",conf.bands=TRUE)) plot(modJoint,type.plot="su","terminal",conf.bands=TRUE)) ## End(Not run)