seqmeant | R Documentation |
Compute the mean total time spent in each state of the alphabet for the set of sequences given as input.
seqmeant(seqdata, weighted=TRUE, with.missing=FALSE, prop=FALSE, serr=FALSE)
seqdata |
a sequence object as defined by the |
weighted |
logical: if |
with.missing |
logical: if set to |
prop |
logical: if |
serr |
logical: if |
An object of class stslist.meant. There are print
and plot
methods for such objects.
Alexis Gabadinho
Gabadinho, A., G. Ritschard, N. S. Müller and M. Studer (2011). Analyzing and Visualizing State Sequences in R with TraMineR. Journal of Statistical Software 40(4), 1-37.
plot.stslist.meant
for basic plots of stslist.meant objects and seqmtplot
(seqplot
with type="mt"
) argument for more sophisticated plots of the mean durations allowing grouping and legend.
## Defining a sequence object with columns 13 to 24
## in the actcal example data set
data(actcal)
actcal.lab <- c("> 37 hours", "19-36 hours", "1-18 hours", "no work")
actcal.seq <- seqdef(actcal,13:24,labels=actcal.lab)
## Computing the mean time in the different states
seqmeant(actcal.seq)
## Mean times with their standard error
seqmeant(actcal.seq, serr=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.