seqedplot | R Documentation |
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 event in the successive periods.
seqedplot(seqe,
group=NULL, breaks=20, ages=NULL,
main="auto", type="survival", ignore=NULL,
with.legend="auto",cex.legend=1,
use.layout=(!is.null(group) | with.legend!=FALSE), legend.prop=NA,
rows=NA, cols=NA,
xaxis="all", xlab="time",
yaxis="all",
ylab=ifelse(type=="survival", "survival probability", "mean number of events"),
cpal=NULL,
title, withlegend, axes, ...)
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 |
String. Title of the graphic. Default is |
type |
String. Type of One of |
ignore |
Character vector. An optional list of events that should not be plotted. |
with.legend |
Logical or string. 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. |
xaxis |
Logical or one of |
yaxis |
Logical or one of |
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 |
withlegend |
Deprecated. Use |
axes |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.