Description Usage Arguments Value Author(s) See Also Examples
Plot method for object of class 'MSLT.S' using the ggplot2 package. It plots the multistate survival function by as estimated by MSLT.S
1 2 |
x |
The multistate survival function. An object of class |
e0 |
Life expectancy at reference age (e.g. at birth) |
order |
Desired sequence of states in plot |
colours |
Colours |
title |
Title for multistate survival plot |
area |
Graph type: area (area=TRUE) or bar (area=FALSE) |
xmin |
Minimum value on x-axis |
xmax |
Maximum value on x-axis |
... |
Further arguments to plot |
The function plot.MSLT.S returns the multistate survival function (S) and the plot. It returns an object with the following components:
S |
The multistate survival function (values used in the plot) |
plot |
The plot produced by the ggplot2 package. |
Frans Willekens
MSLT.S
1 2 3 4 5 6 7 8 9 10 11 |
# The multistate life table based on occurrence-exposure rates
data (GLHS)
param <- Parameters (GLHS)
cr <- Cumrates (irate=3,Bdata=GLHS)
S <- MSLT.S(cr$oe)
radix <- c(10000,0)
mslt <- MSLT.e (S,radix)
# Plot the multistate survival function (object of class 'MSLT.S' )
z<- plot (x=S$S,e0=mslt$e0,title="Multistate survival function",area=TRUE,order=c("N","J"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.