excess_entropy: Excess Entropy

Description Usage Arguments Value Examples

View source: R/excessentropy.R

Description

Compute the average or local excess entropy of a time series with block size k.

Usage

1
excess_entropy(series, k, local = FALSE)

Arguments

series

Vector or matrix specifying one or more time series.

k

Integer giving the block size.

local

Boolean specifying whether to compute the local excess entropy.

Value

Numeric giving the average excess entropy or a vector giving the local excess entropy.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Single initial conditions
xs <- c(0, 0, 1, 1, 0, 0, 1, 1, 0)
excess_entropy(xs, k = 2) # 1.918296

# [1.585 1.585 2.585 2.585 1.585 1.585]
excess_entropy(xs, k = 2, local = TRUE)

# Multiple initial conditions
xs      <- matrix(0, nrow = 9, ncol = 2)
xs[, 1] <- c(0, 0, 1, 1, 0, 0, 1, 1, 0)
xs[, 2] <- c(0, 1, 0, 1, 0, 1, 0, 1, 0)
excess_entropy(xs, k = 2) # 1.109170

# [, 1] 2.585 -0.059 3.585 -0.415 2.585 -0.059
# [, 2] 0.848  0.848 0.848  0.848 0.848  0.848
excess_entropy(xs, k = 2, local = TRUE)

rinform documentation built on April 1, 2018, 12:12 p.m.