Functions for estimating the Average Mutual Information (AMI) of a time
series.

Usage

mutualInformation(time.series, lag.max = NULL, n.partitions = NULL,
units = c("Nats", "Bits", "Bans"), do.plot = TRUE, ...)
## S3 method for class 'mutualInf'
plot(x, main = "Average Mutual Information (AMI)",
xlab = "Time lag", ylab = NULL, type = "h", ...)
## S3 method for class 'mutualInf'
as.numeric(x, ...)
## S3 method for class 'mutualInf'
x[i]
## S3 method for class 'mutualInf'
x[[i]]

Arguments

time.series

The observed time series.

lag.max

Largest lag at which to calculate the AMI.

n.partitions

Number of bins used to compute the probability distribution
of the time series.

units

The units for the mutual information. Allowed units are
"Nats", "Bits" or "Bans" (somethings called Hartleys). Default is "Nats".

do.plot

Logical value. If TRUE, the AMI is plotted

...

Further arguments for the plotting function.

x

A mutualInf object.

main

Title for the plot.

xlab

Title for the x axis.

ylab

Title for the y axis.

type

Type of plot to be drawn.

i

Indices specifying elements to extract.

Details

The Average Mutual Information (AMI) measures how much one random variable tells us about
another. In the context of time series analysis, AMI
helps to quantify the amount of knowledge gained about the value
of x(t+tau) when observing x(t).

To measure the AMI iof a time series, we create a histogram of the data
using bins. Let Pi the probability that the signal has a
value inside the ith bin, and let Pij(tau) be
the probability that x(t) is in bin i ans x(t+tau)
is in bin j. Then, AMI for time delay tau is defined as

AMI(tau) = sum( Pij log( Pij / (Pi*Pj) ) )

Depending on the base of the logarithm used to define AMI, the AMI
is measured in bits (base 2, also called shannons), nats (base e) or
bans (base 10, also called hartleys).

Value

A mutualInf object that consist of a list containing all
the relevant information of the AMI computation:
time.lag, mutual.information, units and n.partitions.

Author(s)

Constantino A. Garcia

References

H. Kantz and T. Schreiber: Nonlinear Time series Analysis (Cambridge university press)
H. Abarbanel: Analysis of observed chaotic data (Springer, 1996).

See Also

timeLag

Examples

## Not run:
sx = sinaiMap(a=0.3,n.sample=5000,start=c(0.23489,0.8923),do.plot=FALSE)$x
mutinf = mutualInformation(sx, n.partitions = 20, units = "Bits")
## End(Not run)