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

plot.nestedPenalR Documentation

Plot Method for a Nested frailty model.

Description

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

Usage

## S3 method for class 'nestedPenal'
plot(x, type.plot="Hazard", conf.bands=TRUE,
pos.legend="topright", cex.legend=0.7, main, color=2, median=TRUE, Xlab = "Time", Ylab =
"Hazard function", ...)

Arguments

x

A nested model, i.e. an object of class frailtyPenal for Nested frailty models (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.

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)

median

Logical value. Determines whether survival median will be plotted. Default is TRUE.

Xlab

Label of x-axis. Default is '"Time"'

Ylab

Label of y-axis. Default is '"Hazard 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





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

plot(modNested,conf.bands=FALSE)





frailtypack documentation built on Nov. 25, 2023, 9:06 a.m.