Learn R Programming

frailtypack (version 2.4.1)

plot.nestedPenal: Plot Method for a Nested frailty model.

Description

Plots estimated baseline survival and hazard functions (output from an object of class `frailtyPenal' for nested frailty models). Confidence bands are allowed.

Usage

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

Arguments

x
A nested model, more generaly an object of class frailtyPenal for Nested frailty models (output from calling frailtyPenal function).
...
Other graphical parameters like those in plot.frailtyPenal

Value

  • Print a plot of the baseline survival or hazard functions with the confidence bands or not (conf.bands argument)

See Also

frailtyPenal

Examples

Run this code
data(dataNested)
modNested <- frailtyPenal(Surv(t1,t2,event)~cluster(group)+
subcluster(subgroup)+cov1+cov2,data=dataNested,n.knots=8,
kappa1=50000,hazard="Splines")

# It takes around 90 minutes to converge (depends on the processor)  #

plot(modNested,conf.bands=FALSE)

Run the code above in your browser using DataLab