seqecmpgroup {TraMineR}R Documentation

Identifying discriminating subsequences

Description

Identify and order the most discriminating subsequences according to a given statistical test.

Usage

seqecmpgroup(subseq, seqe, group, method="bonferroni", p.valuelimit=0.05)

Arguments

subseq The subsequences to order.
seqe The list of event sequences
group The group variable to discriminate
method The test, bonferroni or chisq
p.valuelimit Can be used to set a limit p-value (default to 0.05)

Details

The following test functions are implemented bonferroni returns a p-value with Bonferroni correction applied. chisq return the chisq value directly so decreasing should be set to TRUE.

Value

Returns a data.frame with

row name Name of parameter
index Index of susequence
stat Return value of the test

Examples

data(actcal.tse)
actcal.seqe<-seqecreate(actcal.tse$id,actcal.tse$time,actcal.tse$event)

#Searching for frequent subsequences, that is, appearing at least 20 times
fsubseq<-seqefsub(actcal.seqe,pMinSupport=0.01)

#searching for susbsequences discriminating the most men and women
data(actcal)
discr<-seqecmpgroup(fsubseq$subseq, actcal.seqe, group=actcal$sex, method="bonferroni")

#Plotting on 2 line 3 column the six most discriminating
seqefplot(fsubseq$subseq[discr$index[1:6]], actcal.seqe, group=actcal$sex, mfrow=c(2,3))


[Package TraMineR version 1.0 Index]