Learn R Programming

TraMineR (version 1.6-2)

seqeconstraint: Setting time constraint

Description

Function used to set time constraints in event sequence methods (seqe..) such as seqefsub for searching frequent subsequences or seqeapplysub for checking occurrences of subsequences.

Usage

seqeconstraint(maxGap = -1, windowSize = -1, ageMin = -1,
     ageMax = -1, ageMaxEnd = -1, countMethod = 1)

Arguments

maxGap
The maximum time gap between to events
windowSize
The maximum time span accepted for subsequences
ageMin
Minimal start time position allowed for subsequences. Ignored when equal to -1 (default).
ageMax
Maximal start time position allowed for subsequences. Ignored when equal to -1 (default).
ageMaxEnd
Maximal end time position allowed for subsequences. Ignored when equal to -1 (default).
countMethod
By default, subsequences are counted only one time by sequence. If set to 2, each occurence of the subsequence in a sequence is counted.

Value

  • A constraint object containing one item per constraint type.

Details

maxGap, windowSize, ageMin, ageMax and ageMaxEnd. If so, two events should not be separated by more than maxGap and the whole subsequence should not exceed a windowSize time span. The other parameters specify the start and end age of the subsequence, it should start between ageMin and ageMax and finish before ageMaxEnd. Parameters ageMin, ageMax and ageMaxEnd are interpreted as the number of positions (time units) from the beginning of the sequence.

See Also

seqefsub, seqeapplysub