TraMineR at a glance

Nothing is better than an example to present the features of TraMineR. We will use for this purpose a data set from McVicar and Anyadike-Danes (2002) which is freely downloadable from the internet. The data was converted into an R data frame named mvad that is distributed with the TraMineR package. The mvad data contains 72 monthly activity state variables from July 1993 to June 1999 for 712 individuals and a series of covariates.

The first step common to the different types of analysis includes loading the library and the data set and retrieving the list of possible states. This is done with the following commands (you can copy/paste them into the R console)

seqstatl(mvad[, 17:86])

employment  FE  HE  joblessness  school  training

Next, we create a state sequence object to which we assign, for later usage, short state names for printed output and long state labels for the legend in graphics. We also provide the alphabet to be sure that the order of the names and labels conform with that of the alphabet.
mvad.alphabet <- c("employment", "FE", "HE", "joblessness", "school", 
mvad.labels <- c("employment", "further education", "higher education", 
    "joblessness", "school", "training")
mvad.scodes <- c("EM", "FE", "HE", "JL", "SC", "TR")
mvad.seq <- seqdef(mvad, 17:86, alphabet = mvad.alphabet, states = mvad.scodes, 
    labels = mvad.labels, xtstep = 6)

Using this sequence object, see how easily you can
  1. Visualize the sequence data set

  2. Explore the sequence data set by computing and visualizing descriptive statistics

  3. Build a typology of transitions from school to work

  4. Run discrepancy analyses to study how sequences are related to covariates

  5. Analyse event sequences


McVicar, D. and M. Anyadike-Danes (2002). Predicting successful and unsuccessful transitions from school to work by using sequence methods. Journal of the Royal Statistical Society. Series A (Statistics in Society) 165(2), 317-334.