plot.frailtyPenal {frailtypack}R Documentation

Plot Method for an object of class ‘frailtyPenal’.

Description

Plots estimated baseline survival and hazard functions from an object of class `frailtyPenal'. Confidence bands are allowed.

Usage

plot.frailtyPenal(x, type.plot = "hazard", conf.bands=TRUE, ...)

Arguments

x Object of class frailtyPenal (output from calling frailtyPenal function).
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

Value

Print a plot of class frailtyPenal

See Also

print.frailtyPenal

Examples


data(readmission)

# Let's compare shared frailty model with Cox proportional hazards model 
mod.sha<-frailtyPenal(Surv(time,event)~as.factor(dukes)+cluster(id),
             n.knots=10,kappa1=10000,data=readmission)
plot(mod.sha,type="surv",conf=FALSE)
mod.cox<-frailtyPenal(Surv(time,event)~as.factor(dukes)+cluster(id),
             n.knots=10,kappa1=10000,data=readmission,Frailty=FALSE)
lines(mod.cox,type="surv",conf=FALSE,col=2)



# Stratified model
mod<-frailtyPenal(Surv(time,event)~as.factor(dukes)+cluster(id)+strata(sex),
             n.knots=10,kappa1=10000,kappa2=10000,data=readmission)
plot(mod)

# no confidence bands
plot(mod,conf.bands=FALSE)


[Package frailtypack version 2.0-2 Index]