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)library(TraMineR) data(mvad) seqstatl(mvad[, 17:86])
employment FE HE joblessness school training
mvad.alphabet <- c("employment", "FE", "HE", "joblessness", "school", "training") 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
Visualize the sequence data set
Explore the sequence data set by computing and visualizing descriptive statistics
Build a typology of transitions from school to work
Run discrepancy analyses to study how sequences are related to covariates
Analyse event sequences