Event sequences

Instead of focusing on sequences of states, we can look at sequences of transitions or events. TraMineR offers specific tools to deal with such kind of data. The following figure displays the 6 transitions which best discriminate (Ritschard et al., 2013) the clusters found on page typology and plots their frequencies in each cluster. Commands to transform state sequences into event sequences and to produce the plot of the best discriminating subsequences are given below the figure.

  1. Create a state sequence object from the mvad data set.

  2. Create event sequences from the state sequences. The result is stored in an event sequence object.
    mvad.seqe <- seqecreate(mvad.seq, use.labels = FALSE)
  3. Look for frequent event subsequences and plot the 15 most frequent ones.
    fsubseq <- seqefsub(mvad.seqe, = 0.05)
    plot(fsubseq[1:15], col = "cyan")

  4. Determine the subsequences of transitions which best discriminate the clusters found on page typology and plot the frequencies of the first 6 ones in each cluster.
    discr <- seqecmpgroup(fsubseq, group = cl1.4fac)


Ritschard, G., Bürgin, R. & Studer, M. (2013), "Exploratory Mining of Life Event Histories", In McArdle, J.J. & Ritschard, G. (eds) Contemporary Issues in Exploratory Data Mining in the Behavioral Sciences. Series: Quantitative Methodology, pp. 221-253. New York: Routledge. Available here.