seqecmpgroup {TraMineR}R Documentation

Identifying discriminating subsequences

Description

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

Usage

seqecmpgroup(subseq, group, method="chisq", pvalue.limit=NULL)

Arguments

subseq The subsequences to order. To get a list of subsequence see seqefsub
group The group variable to discriminate
method The test, bonferroni or chisq
pvalue.limit Can be used to filter the results. Only subsequences with p-value lower than this parameter will be kept. If NULL all subsequences are returned (regardless there p-value).

Details

The following test functions are implemented bonferroni Chi squared test with Bonferroni correction applied. chisq Chi squared test.

Value

Returns a specific objet of type subseqelistchisq (subtype of subseqelist) that can be plotted and printed.

subseq List of subsequences
labels labels of groups variables
constraint time constraints usued to compute subsequences see seqeconstraint
seqe The event sequences that were used to compute the test
index Index of susequence
data A data.frame with the support of each subsequence, index (original order), two column per group with frequencies and pearson residuals

See Also

See Also plot.subseqelistchisq to plot the results

Examples

data(actcal.tse)
actcal.seqe <- seqecreate(actcal.tse)

##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, group=actcal$sex, method="bonferroni")
##Printing discriminating subsequences
print(discr)
##Plotting the six most discriminating subsequences
plot(discr[1:6])


[Package TraMineR version 1.1 Index]