Click or drag to resize

TimeSeriesAutocovariance Method

Computes the autocovariance for all lags.

Namespace:  Meta.Numerics.Statistics
Assembly:  Meta.Numerics (in Meta.Numerics.dll) Version: 4.1.4
public double[] Autocovariance()

Return Value

Type: Double
An array of autocovariance values, with the array index equal to the lag index.

The computation of the autocovariance for a given lag is an O(N) operation. Naively, the computation of the autocovariance for all N possible lags is an O(N^2) operation; this is in fact the cost of N invoations of Autocovariance(Int32). However, it is possible using Fourier techniques to simultaneously compute the autocovariance for all possible lags in O(N log N) operations. This method uses this Fourier technique and should be called if you require the autocovariance for more than a handfull of lag values.

See Also