I am using the seqgranularity
command in TraMineRExtras
. I read in the help documentation that I can indicate method = "mostfreq"
. What happens if, for example, I move from monthly to yearly data and in the 12 months I have 6 months in a state and 6 months in another state? Which of the two will be used to define the yearly sequences?
Thank you!
seqgranularity in TraMineRExtras
49 Views Asked by emanuela.struffolino At
1
The most frequent category is identified by applying
which.max
on the outcome ofseqistatd
, which returns the state frequencies in the order of the alphabet.which.max
returns the index of the first encountered maximum. Therefore, withmethod="mostfreq"
,seqgranularity
assigns the category that appears first in the alphabet among those that share the maximal frequency.The example below with two sequences of length 24 shows how the outcome changes with the alphabet order