## 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 = "state")
## 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")
Run the code above in your browser using DataLab