ordinal_pattern_distribution: A function to compute ordinal pattern statistics

Description Usage Arguments Details Value Author(s) References Examples

View source: R/ordinal_pattern_distribution.R

Description

Computation of the ordinal patterns of a time series (see e.g. Bandt and Pompe 2002)

Usage

1

Arguments

x

A numeric vector (e.g. a time series), from which the ordinal pattern distribution is to be calculated

ndemb

Embedding dimension of the ordinal patterns (i.e. sliding window size). Should be chosen such as length(x) >> ndemb

Details

This function returns the distribution of ordinal patterns using the Keller coding scheme, detailed in Physica A 356 (2005) 114-120. NA values are allowed, and any pattern that contains at least one NA value will be ignored. (Fast) C routines are used for computing ordinal patterns.

Value

A character vector of length factorial(ndemb) is returned.

Author(s)

Sebastian Sippel

References

Bandt, C. and Pompe, B., 2002. Permutation entropy: a natural complexity measure for time series. Physical review letters, 88(17), p.174102.

Examples

1
2
x = arima.sim(model=list(ar = 0.3), n = 10^4)
ordinal_pattern_distribution(x = x, ndemb = 6)

Example output

  [1] 34 24 28 19 22 12 14 19 32 39 14 14 27 18 25 16 25 16 14  6 18 18 13 18  8
 [26]  6 16 15 11 25 24 26 14 21 14 10 19 12 16 18 18 15 29 20 25 21 22 16 18 14
 [51] 15 17 25 20 12 11 17 10 21 19 20 19 12  9 16  9  7 12 13  8 11 10 11  9 13
 [76] 10  9 14  8 11 11 11 14 24 11  7 13 20 19 29 12  9  7  3 10 10 13  4  8  5
[101]  7  6  9 18 14 12  9 15 23  8  7 16 16 21 10 12 23 22 24 23 24 26 24 14 11
[126]  8 23 13 24 15 12 12  7 14  8 12 13 15 14  7  8  9 16 16  7 10 10 11 11 15
[151] 22 20 11 14 15  7 15  5 12  5  6  4 11 10  4  7 13 14 14  4  9  5  9 12  8
[176] 11 12 12 15 24 22 20 16  9 19  5 13 12 13 10  9  9 20 14 12 11  8 17 13  9
[201] 11 13 16 16  7  6 13 13 24 27 16 11  3  7 14 15  5 12 10  8 12 13 11  9 11
[226] 13 19 17 12 17 15 17 20 19 14 12 20 24 28 31 21 19 15 15 10 13 18 14 15 13
[251] 12 11 11  8  4  7  5  9  3  2 10  4  9 10 11  5  9  9 14 19 11 14  7  6  8
[276] 16 13  5  9  2 12 15 14  9  5  2  6 12  7  7  7  7  7 14  9  8  8  7 16 18
[301] 19 23 17 18 10  6 18 11 11 13  8 11 15 10 12 18  9 19  6 10 10 18  6 10  8
[326]  8 16 16 21 18 19 13 15  6 11  5 15  9  9  9  8 13 13 16 23 19 15 16 19 22
[351] 24 24 18 21 13 24 18 28 36 27 30 30 26 24 17 12 23 18 30 17 18  9 18 14 11
[376] 21 17 16 12  7  8  9 12 11  7  9  7  9 15 23 20 20 23 11 11 14 19 10  9 13
[401]  8 18 24 16 12 17 10 19 11  7 17 10 14 16  8  6 10 13 13 25 15 16  8  5 12
[426]  4 15  1 10 11  8  8 11  6 10  5  2 15 12  9  7  7 12 12  8 10 10  9 15 21
[451] 10 23 10  4  5  8 10  5  5  6 10 15  7 15 10  4 11 10 18 10 12 16  4 12 17
[476] 13 11 10 23 36 21 34 27 19 13 16 22 28 21 16 14 16 12 14  8 19 11 19 10  3
[501] 10  6  7 21  8 12  4 14 12 19 29 26  8 15  5 11 12 13 10 12  9  7 20 18 11
[526] 15 10 18 10  8  9  7  6 10  8  6  6 13 20 16 20 19  5 11  6  9 18 10 13  8
[551] 10 13 14 11  8  8  4  8 10  5  7 11  4  5 12  8  9 16 24 19 17 17 11  5  4
[576] 12 13 21  4  6  7 12 14 11 10 12  8 14 18 14 15 17  9 16  5 18  9 23 31 20
[601] 28 21 27 11  4 11 18 17 18 13 15 16 17  8 12  8  8 12  9 12  9 14 12 13  7
[626]  5 11  9 13 24 20 16 18  7  3 15 23 23 15 13 13 12  8 15 13 20 12 12 13 17
[651]  8  9 14 13  9 12 13 12 14 20 25 21 21  9  8  8 28 25 18 21 11 17 14 19 20
[676] 29 14 14 19 13 26 12 14 25 12 15 16 17 20 25 16 14 21 11 11 10  8 21 18 14
[701] 17 15 20 13 27 20 21 20 19 11 34 31 28 23 17 19 24 25 32 34

statcomp documentation built on May 31, 2017, 3:02 a.m.