| seqetm {TraMineR} | R Documentation |
This function automatically create an event transition matrix to transform state sequences data in TSE format (transitions).
seqetm(seq, method = "transition", use.labels = TRUE, sep = ">", bp = "", ep = "end")
seq |
The state sequence to create transitions from |
method |
The method to use. Actually, "transition" and "period" are available. |
use.labels |
If true, transitions names are build from sequence labels instead of sequence alphabet. |
sep |
Separator to use between period in "transition" method. |
bp |
Prefix to signal begining of a period |
ep |
Prefix to signal end of a period |
Two method are implemented and can be set throught the method parameter:
The event matrix.
See Also seqformat for conversion to TSE format and seqecreate for handling transition data.
## Creating a sequence object with the columns 13 to 24
## in the 'actcal' example data set
data(actcal)
actcal.seq <- seqdef(actcal,13:24,
labels=c("FullTime", "PartTime", "LowPartTime", "NoWork"))
## Creating a transition matrix, one event per transition
seqetm(actcal.seq,method = "transition")
## Creating a transition matrix, two events per transition
seqetm(actcal.seq,method = "period")
## Creating a transition matrix, considering the begining
## as a special event, two events per transition
seqetm(actcal.seq,method = "period", bp="begin")