Generalized Ordinal Patterns

Generalized ordinal patterns extend classical ordinal patterns for time-series analysis by allowing ties between observations, which often occur in discrete or rounded data. Instead of simple permutations, they use Cayley permutations to represent the relative ordering of values, including equal ones. This makes it possible to capture the structure of discrete time series without artificially breaking ties.

The frequencies of these patterns can be used to test for serial dependence: since their theoretical distribution under independence is not uniform, bootstrap methods are used to obtain valid test statistics. The same idea can be applied in statistical process control (SPC) by monitoring changes in the distribution of generalized ordinal patterns over time, which can signal shifts or emerging dependencies in a process.

StatsOrdinalPatterns.jl provides functions for computing generalized ordinal patterns from time series data and for conducting (sequential) tests based on these patterns. It also enables the replication of several studies listed below.

References

Bandt, Christoph, and Bernd Pompe. 2002. “Permutation Entropy: A Natural Complexity Measure for Time Series.” Physical Review Letters 88 (17). https://doi.org/10.1103/physrevlett.88.174102.
Bian, Chunhua, Chang Qin, Qianli DY Ma, and Qinghong Shen. 2012. “Modified Permutation-Entropy Analysis of Heartbeat Dynamics.” Physical Review E—Statistical, Nonlinear, and Soft Matter Physics 85 (2): 021906.
Schnurr, Alexander, and Svenja Fischer. 2022. “Generalized Ordinal Patterns Allowing for Ties and Their Applications in Hydrology.” Computational Statistics & Data Analysis 171: 107472.
Unakafova, Valentina A, and Karsten Keller. 2013. “Efficiently Measuring Complexity on the Basis of Real-World Data.” Entropy 15 (10): 4392–415.
Weiß, Christian H, and Alexander Schnurr. 2024. “Generalized Ordinal Patterns in Discrete-Valued Time Series: Nonparametric Testing for Serial Dependence.” Journal of Nonparametric Statistics 36 (3): 573–99.