Learn R Programming

SmoothHazard (version 1.0.9)

plot.shrPl: Plot method for a survival model using a penalized likelihood approach.

Description

Plot estimated baseline survival function from an object of class shrPl. Confidence bands are allowed.

Usage

## S3 method for class 'shrPl':
plot(x, ...)

Arguments

x
a fitted survival model using a penalized likelihood approach (output from calling shr with the option hazard="Spline".
...
other graphical parameters like those in plot.shr

Value

  • Print a plot of hazard function and survival function of a class shrPl object

See Also

print.shrPl,summary.shrPl,shr,

Examples

Run this code
/*** a penalized survival model ***/
data(test)
fit.su <- shr(Hist(time=list(l,r),id)~cov,data=test,hazard="Splines") 

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

# confidence bands
plot(fit.su)

Run the code above in your browser using DataLab