Learn R Programming

TraMineR (version 1.6-2)

seqdiff: Decompose the difference between groups of sequences

Description

Decompose the difference between groups of sequences

Usage

seqdiff(seqdata, group, cmprange = c(0, 1),
        seqdist_arg=list(method="LCS",norm=TRUE))

Arguments

seqdata
a state sequence object created with the seqdef function.
group
The group variable
cmprange
The range used to compare subsequences
seqdist_arg
argument passed directly to seqdist as a list

Value

  • A seqdiff object, with the following items:
  • statA data.frame with three statistics (PseudoF, PseudoR2 and PseudoT) for each timestamp of the sequence, see dissassoc
  • varianceA data.frame with, at each time stamp, the discrepancy within each group defined by the group variable and for the whole population.

encoding

latin1

Details

Analyses at each timestamp the sequence discrepancy within a sliding time window (of range defined by cmprange) that is explained by the group variable. The method computes a distance matrix, using seqdist at each timestamp and then derives the explained discrepancy with dissassoc. There are print and plot methods for the result returned.

References

Studer, M., G. Ritschard, A. Gabadinho, and N. S. M�ller (2009) Discrepancy analysis of complex objects using dissimilarities. In H. Briand, F. Guillet, G. Ritschard, and D. A. Zighed (Eds.), Advances in Knowledge Discovery and Management, Studies in Computational Intelligence. Berlin: Springer. Studer, M., G. Ritschard, A. Gabadinho and N. S. M�ller (2009) Analyse de dissimilarit�s par arbre d'induction. In EGC 2009, Revue des Nouvelles Technologies de l'Information, Vol. E-15, pp. 7-18.

See Also

dissassoc to analyse the association with the whole sequence

Examples

Run this code
## Defining a state sequence object
data(mvad)
mvad.seq <- seqdef(mvad[, 17:86])

## Building dissimilarities
mvad.diff <- seqdiff(mvad.seq, group=mvad$gcse5eq)
print(mvad.diff)
plot(mvad.diff)
plot(mvad.diff, stat="Variance")

Run the code above in your browser using DataLab