Graphical representation of a set of events sequences.
This function provides two ways to represent a set of events.
The first one (type="survival"
) plots the survival curves of the first occurrence of each event.
The second one (type="hazard"
) plots the mean counts of each events in a given time frame.
seqedplot(seqe, group = NULL, breaks = 20, ages = NULL, main = NULL, type = "survival", ignore = NULL, withlegend = "auto", cex.legend = 1, use.layout = (!is.null(group) | withlegend != FALSE), legend.prop = NA, rows = NA, cols = NA, axes = "all", xlab = "time", ylab = ifelse(type == "survival", "survival probability", "mean number of events"), cpal = NULL, title, ...)
seqe |
an event sequence object as defined by the |
group |
Plots one plot for each level of the factor given as argument. |
breaks |
Number of breaks defining a period. |
ages |
Two numeric values representing minimum and maximum ages to be represented. |
main |
title for the graphic. Default is |
type |
the type of the plot. If |
ignore |
Character. An optional list of events that will not be plotted. |
withlegend |
defines if and where the legend of the state colors is plotted.
The default value |
cex.legend |
expansion factor for setting the size of the font for the labels in the legend. The default value is 1. Values lesser than 1 will reduce the size of the font, values greater than 1 will increase the size. |
use.layout |
if |
legend.prop |
proportion of the graphic area used for plotting the legend when |
rows |
optional arguments to arrange plots when use.layout=TRUE. |
cols |
optional arguments to arrange plots when use.layout=TRUE. |
axes |
if set to "all" (default value) x-axes are drawn for each plot in the graphic. If set to "bottom" and group is used, axes are drawn only under the plots located at the bottom of the graphic area. If FALSE, no x-axis is drawn. |
xlab |
an optional label for the x-axis. If set to |
ylab |
an optional label for the y-axis. If set to |
cpal |
Color palette used for the events. If |
title |
Deprecated. Use |
... |
Additional arguments passed to |
Matthias Studer
Studer, M., Müller, N.S., Ritschard, G. & Gabadinho, A. (2010), "Classer, discriminer et visualiser des séquences d'événements", In Extraction et gestion des connaissances (EGC 2010), Revue des nouvelles technologies de l'information RNTI. Vol. E-19, pp. 37-48.
data(actcal.tse) actcal.tse <- actcal.tse[1:200,] iseq <- unique(actcal.tse$id) nseq <- length(iseq) data(actcal) actcal <- actcal[rownames(actcal) %in% iseq,] actcal.seqe <- seqecreate(actcal.tse) seqelength(actcal.seqe) <- rep(12, nseq) seqedplot(actcal.seqe, type="hazard", breaks=6, group=actcal$sex, lwd=3) seqedplot(actcal.seqe, type="survival", group=actcal$sex, lwd=3)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.