seqmeant {TraMineR} | R Documentation |
Compute the mean durations spent in each state of the alphabet for the set of sequences given as input.
seqmeant(seqdata, weighted = TRUE)
seqdata |
a sequence object as defined by the seqdef function. |
weighted |
if TRUE , the weights (weights attribute) attached to the sequence object are used for computing weighted mean durations. |
An object of class stslist.meant. There are print
and plot
methods for such objects.
plot.stslist.meant
for basic plots of stslist.meant objects and 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 durations seqmeant(actcal.seq)