Learn R Programming

TraMineR (version 1.1)

seqdiff: Decompose the diffences 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
The sequence to analyse
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 item:
  • statA data.frame with tree statistics, PseudoF, PseudoR2 and PseudoT for each timestamp of the sequence, see dissassoc
  • varianceA data.frame with the variance of each group defined by the group variable and for the whole population at each timestamp

Details

Analyse for each timestamp the pseudo-variance of a subsequence (defined by cmprange) explained by the group variable. The method compute a distance matrix, using seqdist for each timestamp and then apply dissassoc to compute the pseudo variance explained. There are print and plot method for the result returned.

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