Preview

Computing and visualizing descriptive statistics

Here we use the powerful descriptive and visualization tools offered by TraMineR to gain knowledge from the mvad data set. Single commands compute transversal or longitudinal descriptive statistics and display them in nice looking plots. The commands used to generate the plots are given below the Figure.

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

  2. Divide the graphic area in 2 rows and 2 columns (we want to include four different plots in the same figure).
    par(mfrow = c(2, 2))
    
  3. Compute and plot the state distributions by time points. Borders surrounding the bars are removed for nicer output. The display of the legend is deactivated since we include several plots in the same figure.
    seqdplot(mvad.seq, with.legend = FALSE, border = NA)
    

  4. Compute and plot the transversal entropy index (sequence of entropies of the transversal state distributions).
    seqHtplot(mvad.seq)
    

  5. Plot the sequence of modal states of the transversal state distributions.
    seqmsplot(mvad.seq, with.legend = FALSE, border = NA)
    

  6. Plot the mean time spent in each state of the alphabet.
    seqmtplot(mvad.seq, with.legend = FALSE)