plot.frailtyPenal {frailtypack}R Documentation

Plot Method for a Shared frailty model.

Description

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

Usage


## S3 method for class 'frailtyPenal':
plot(x, type.plot = "hazard", conf.bands=TRUE, ...)

Arguments

x A shared frailty model, more generally a frailtyPenal class object (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 a shared frailty model.

See Also

print.frailtyPenal, summary.frailtyPenal, frailtyPenal for Shared frailty models

Examples


data(readmission)

# /*** Shared frailty model ***/

modSha<-frailtyPenal(Surv(time,event)~as.factor(dukes)+cluster(id),
             n.knots=10,kappa1=10000,data=readmission,Frailty=TRUE)

plot(modSha,type="surv",conf=FALSE)

# /*** Cox proportional hazard model using Penalized likelihood ***/

modCox<-frailtyPenal(Surv(time,event)~as.factor(dukes)+cluster(id),
             n.knots=10,kappa1=10000,data=readmission,Frailty=FALSE)
plot(modCox)

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

[Package frailtypack version 2.2-12 Index]