So, I have a set of 893 sequences of varying lengths with max sequence length = 152. There are 10 unique states across all of them. These sequences are split into two groups: Promoted and Not Promoted. Using TramineR, I generated representative sequence for the two groups (Image attached).
However, I am trying to print out the first 5-10 states of the said representative sequence. Is there a way to do that? ![Representative Sequences] (https://i.stack.imgur.com/lKivC.jpg)
The print can be in the form of color labels or in a string format (preferably color labels)
I could not find any argument in the seqrplot that can help me get what I want.
You cannot subset the displayed columns when using
seqrplotunless you want to find representatives of the truncated sequences. However, you can compute and retrieve the representatives of the complete sequences and then plot the truncated representatives. I illustrate below using thebiofamdata of TraMineR.If you have groups, you must compute the representatives separately for each group and then arrange the plots manually using
layoutfor example.