| plot.frailtyIllnessDeath | R Documentation |
Plots estimated baseline survival and hazard functions from an object of class 'frailtyIllnessDeath'. Confidence bands are allowed.
## S3 method for class 'frailtyIllnessDeath'
plot(x, type.plot = "Baseline hazard", transition,
conf.bands=TRUE, pos.legend = "topright", cex.legend=0.7, lwd=c(1,1,1),
color=2, median=TRUE, Xlab = "Time", Ylab= "Baseline hazard function",...)
x |
A Weibull Illness-Death model, i.e. an |
type.plot |
a character string specifying the type of curve. Possible value are "Baseline hazard", or "Baseline survival". The default is "Baseline hazard". Only the first letters are required, e.g "Haz", "Su". |
transition |
Argument to specify if only the plot of one of the three transitions is wanted. If not specified, the plots for all transitions are displayed. Possible values are "01", "02" or "12". |
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. |
lwd |
A vector of length 3 of positive values to specify the line width of the plots and their confidence bands. If no confidence bands are plotted, the last two elements of the vector are ignored. Default is (1,1,1). |
color |
color of the curve (integer). |
median |
Logical value. Determines whether median survival time will be plotted. Default is TRUE. |
Xlab |
Label of x-axis. Default is '"Time"'. |
Ylab |
Label of y-axis. Default is '"Baseline hazard function"'. |
... |
other unused arguments |
Print a plot of a Weibull Illness-Death model with optional shared frailty between transitions.
frailtyIllnessDeath
###--- Semi-Markovian Weibull Illness-Death model with left truncation ---###
data(Paq810)
ModIllnessDeath_SemiMarkov_LeftTrunc <- frailtyIllnessDeath(
formula = Surv(e, r, dementia) ~ gender + certif,
formula.terminalEvent = Surv(t, death) ~ gender + certif,
data = Paq810,
print.info = FALSE,
maxit = 100
)
plot(ModIllnessDeath_SemiMarkov_LeftTrunc)
#-- No confidence bands
plot(ModIllnessDeath_SemiMarkov_LeftTrunc, conf.bands = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.