Learn R Programming

frailtypack (version 2.7.1)

plot.additivePenal: Plot Method for an Additive frailty model.

Description

Plots estimated baseline survival and hazard functions of an additive frailty model, more generally of a class `additivePenal' object. Confidence bands are allowed.

Usage

## S3 method for class 'additivePenal':
plot(x, type.plot="hazard", conf.bands=TRUE,
 pos.legend="topright", cex.legend=0.7, main, color=2, ...)

Arguments

x
A fitted additive frailty model (output from calling additivePenal)
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.
pos.legend
The location of the legend can be specified by setting this argument to a single keyword from the list '"bottomright"', '"bottom"', '"bottomleft"', '"left"', '"topleft"', '"top"', '"topright"', '"right"' and '"center"'. The default is '"topright"'
cex.legend
character expansion factor *relative* to current 'par("cex")'. Default is 0.7
main
plot title
color
curve color (integer)
...
Other graphical parameters like those in plot.frailtyPenal

Value

  • Print a plot of HR and survival function of a class additivePenal object

See Also

additivePenal

Examples

Run this code
data(dataAdditive)

modAdd <- additivePenal(Surv(t1,t2,event)~cluster(group)+var1+slope(var1),
correlation=TRUE,data=dataAdditive,n.knots=8,kappa=862,hazard="Splines")

#-- 'var1' is boolean as a treatment variable

plot(modAdd)

Run the code above in your browser using DataLab