Skip to content

get_state_freq_and_entropy_per_seq() ​

Builds per-sequence state distributions (counts or proportions) plus entropy.

Function Usage ​

python
from sequenzo import get_state_freq_and_entropy_per_seq
result = get_state_freq_and_entropy_per_seq(seqdata, prop=False)

Entry Parameters ​

  • seqdata: SequenceData object.
  • prop: return proportions instead of counts.

Returns ​

DataFrame with state columns and entropy per sequence.

TraMineR Mapping ​

  • Equivalent TraMineR function: TraMineR::seqistatd().

Authors ​

Code and documentation: Yuqi Liang

See Also ​

References ​

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

Sequenzo is released under the BSD-3-Clause License; this documentation site source is licensed under MIT.