I'm using TraMineR to analyze the transitions between states over a 30 minute trial. There are 10 states, and then missing values, for the entire 108,000 frames. When I get the subsequences, it includes even one transition as a subsequence, and for my purposes, that isn't helpful. I know there's a way to cap how long the subsequences can be, but is there also a way to cap how many transitions it needs to be considered a subsequence?
# defines the STS object
seq.d <- seqdef(seq, informat="STS", stsep=NULL,
alphabet=alph, states=bet, weights=NULL,
left=NA, right="DEL", void="%", nr="*",
cnames=NULL, xtstep=1, tick.last=FALSE, cpal=NULL,
missing.color="darkgrey", labels=NULL)
# creates a seqelist object
seq.e <- seqecreate(data=seq.d, id=NULL, timestamp=NULL,
event=NULL, end.event=NULL, tevent="transition", use.labels = TRUE,
weighted = NULL)
# subsequences ordered by frequency
seq.s <- seqefsub(seq.e, pmin.support = 0.10, constraint=seqeconstraint(max.gap = 30,
window.size = 300, age.min = -1, age.max = -1,age.max.end = -1, count.method = "CDIST"), max.k = 10)