plot.stslist.surv {TraMineRextras} | R Documentation |
Plot method for objects produced by the seqsurv function
Description
This is the plot method for objects of class stslist.surv produced by
the seqsurv
function.
Usage
## S3 method for class 'stslist.surv'
plot(x, cpal = NULL, ylab = NULL, xlab = NULL,
xaxis = TRUE, yaxis = TRUE, xtstep = NULL, tick.last = NULL,
...)
Arguments
x |
An object of class |
cpal |
Vector of colors. Alternative color palette to be used for the drawn lines. The vector should be of length equal to the number of drawn survival curves, i.e., the number of selected states or number of groups when |
ylab |
Optional label for the y axis. If set as |
xlab |
Optional label for the x axis. If set as |
xaxis |
Logical. Should the x-axis be plotted. Default is |
yaxis |
Logical. Should the y-axis be plotted. Default is |
xtstep |
Optional interval at which the tick-marks of the x-axis are
displayed. For example, with |
tick.last |
Logical. Should a tick mark be enforced at the last position on the x-axis? If unspecified, the |
... |
Further graphical parameters. For more details about the graphical parameter
arguments, see |
Details
This is the plot method for the output produced by the seqsurv
function, i.e., objects of class stslist.surv. It displays the survival
curves fitted for states in sequences.
Author(s)
Matthias Studer, Gilbert Ritschard, Pierre-Alexandre Fonta
See Also
Examples
## Defining a sequence object with the data in columns 10 to 25
## (family status from age 15 to 30) in the biofam data set
data(biofam)
biofam.lab <- c("Parent", "Left", "Married", "Left+Marr",
"Child", "Left+Child", "Left+Marr+Child", "Divorced")
biofam.seq <- seqdef(biofam, 10:25, labels=biofam.lab)
## State survival plot
biofam.surv <- seqsurv(biofam.seq)
plot(biofam.surv)