compute sample autocorrelations of a real Vector - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Statistics : Statistics Package : Quantities : Statistics/AutoCorrelation

Statistics[AutoCorrelation] - compute sample autocorrelations of a real Vector

Calling Sequence

AutoCorrelation(X)

AutoCorrelation(X, lags)

Parameters

X

-

discrete univariate real time series given as a Vector, list, Matrix with one column, or TimeSeries object with one dataset.

lags

-

(optional) maximal lag to return, or a range of lags to return. By default all possible lags are returned.

Description

• 

For a discrete time series X, the AutoCorrelation command computes the autocorrelations Rk=CkC0 where Ck=t=1nkXtμXt+kμ for k=0..n1 and  μ is the mean of X.

• 

For efficiency, all of the lags are computed at once using a numerical discrete Fourier transform.  Therefore all data provided must have type realcons and all returned solutions are floating-point, even if the problem is specified with exact values.

• 

Note: AutoCorrelation makes use of DiscreteTransforms[FourierTransform] and thus will work strictly in hardware precision, that is, its accuracy is independent of the setting of Digits.

• 

For more time series related commands, see the TimeSeriesAnalysis package.

Examples

withStatistics:

AutoCorrelation1,2,1,2,1,2,1,2

1.0.8750000000090560.7500000000201850.6250000000148730.5000000000150000.3750000000151270.2500000000098150.125000000020944

(1)

AutoCorrelation1,2,1,2,1,2,1,2,2

1.0.8750000000090560.750000000020185

(2)

AutoCorrelation1,2,1,2,1,2,1,2,0..2

1.0.8750000000090560.750000000020185

(3)

AutoCorrelation1,2,1,2,1,2,1,2,1..2

0.8750000000090560.750000000020185

(4)

AutoCorrelation1,2,1,2,1,2,1,2,2,'scaling'='unbiased'

1.1.000000000010351.00000000002691

(5)

AutoCorrelation1,2,1,2,1,2,1,2,2,'scaling'='biased'

0.06249999999812500.05468749999892540.0468749999998553

(6)

AutoCorrelation1,2,1,2,1,2,1,2,2,'raw'

0.4999999999850000.4374999999914030.374999999998843

(7)

t:=TimeSeriesAnalysis:-TimeSeries1,2,1,2,1,2,1,2,8,7,6,5,4,3,2,1,header=Sales,Profits,enddate=2012-01-01,frequency=monthly

t:=Time seriesSales, Profits8 rows of data:2011-06-01 - 2012-01-01

(8)

AutoCorrelationt..,Sales,2

1.0.8750000000090560.750000000020185

(9)

Autocorrelation can be used to create correlograms which are useful for detecting periodicity in signals.

R:=AutoCorrelationseq1evalfsin17.2icos13.8i+1.17+rand0..1233,i=1..1000,200:

ColumnGraphR,'color'=Gray,'style'='polygon'

Periodicity in a time series can be observed with Autocorrelation.

withTimeSeriesAnalysis:

Data:=Importcatkerneloptsdatadir,/datasets/Sunspots.csv

Data:= 315 x 2 MatrixData Type: anythingStorage: rectangularOrder: Fortran_order

(10)

tsData:=TimeSeriesData265..310,2

tsData:=Time seriesdata set46 rows of data:1969 - 2014

(11)

S:=AutoCorrelationtsData

S:= 1 .. 46 VectorcolumnData Type: float8Storage: rectangularOrder: Fortran_order

(12)

ColumnGraphS,'color'=Gray,'style'='polygon'

See Also

ColumnGraph, Statistics[CrossCorrelation], TimeSeriesAnalysis


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam