Skip to content

Indicator Functions: Sequenzo and TraMineR Mapping

This page maps Sequenzo indicator functions to their closest TraMineR counterparts for users migrating from R.

What This Section Covers

This section focuses on sequence-level indicators: functions that describe the internal structure of each sequence, such as transitions, entropy, complexity, turbulence, and quality-related scores.

For TraMineR users, you can think of this as the place to compute your core individual indicators first.

How It Relates to statistics

After computing indicators here, the statistics section helps you summarize and compare results (for example, descriptive summaries, state-time aggregates, and helper statistics).

In short:

  • sequence-characteristics-indicators answers: "What is the structure/quality of each sequence?"
  • statistics answers: "How do we summarize or compare those outputs?"
Sequenzo functionTraMineR counterpartNotes
get_sequence_lengthseqlengthDirect match for sequence length.
get_spell_durationsseqdurDirect match for spell durations.
get_visited_statesseqindic(indic="visited")Counts how many states each sequence visits.
get_recurrenceseqindic(indic="recu")Recurrence-style indicator.
get_mean_spell_durationseqivardur / seqindic(meand, meand2)Mean spell duration (variant controlled by type).
get_duration_standard_deviationseqivardur / seqindic(dustd, dustd2)Spell-duration standard deviation variants.
get_subsequences_all_sequencesseqsubsnNumber of distinct subsequences.
get_number_of_transitionsseqtransnNumber of transitions (including normalized/weighted options).
get_spell_duration_varianceseqivardurSpell-duration variance (type 1 / type 2).
get_state_freq_and_entropy_per_seqseqistatdPer-sequence state distribution and related entropy view.
get_within_sequence_entropyseqientWithin-sequence entropy.
get_entropy_differenceseqientdiffEntropy-difference indicator.
get_cross_sectional_entropyseqstatdCross-sectional distribution/entropy by time position.
get_volatilityseqivolatilityVolatility indicator.
get_complexity_indexseqiciComplexity index.
get_turbulenceseqSTTurbulence indicator.
get_positive_negative_indicatorsseqipos / seqindic(binary)Binary-state indicator family.
get_integration_indexseqintegrIntegration indicator.
get_badness_indexseqibadRanked indicator.
get_degradation_indexseqidegradRanked indicator.
get_precarity_indexseqprecarityRanked indicator.
get_insecurity_indexseqinsecurityRanked indicator.

Author

Code and documentation: Yuqi Liang

References

Gabadinho, A., G. Ritschard, N. S. Müller and M. Studer (2011). Analyzing and Visualizing State Sequences in R with TraMineR. Journal of Statistical Software 40(4), 1-37.

Ritschard, G. (2023), "Measuring the nature of individual sequences", Sociological Methods and Research, 52(4), 2016-2049. doi:10.1177/00491241211036156.