Assembly: ImslCS (in ImslCS.dll) Version: 6.5.0.0
Syntax
C# |
---|
[SerializableAttribute] public class CrossCorrelation |
Visual Basic (Declaration) |
---|
<SerializableAttribute> _ Public Class CrossCorrelation |
Visual C++ |
---|
[SerializableAttribute] public ref class CrossCorrelation |
Remarks
CrossCorrelation estimates the cross-correlation function of two jointly stationary time series given a sample of n = x.Length observations and for t = 1,2, ..., n.
Let
be the estimate of the mean of the time series whereThe autocovariance function of , , is estimated by
where K = maximumLag. Note that is equivalent to the sample variance of x returned by property VarianceX. The autocorrelation function is estimated byNote that by definition. Let
be similarly defined.The cross-covariance function is estimated by
The cross-correlation function is estimated byThe standard errors of the sample cross-correlations may be optionally computed according to the GetStandardErrors method argument stderrMethod. One method is based on a general asymptotic expression for the variance of the sample cross-correlation coefficient of two jointly stationary time series with independent, identically distributed normal errors given by Bartlet (1978, page 352). The theoretical formula is
For computational purposes, the autocorrelations and and the cross-correlations are replaced by their corresponding estimates for , and the limits of summation are equal to zero for all k such that .A second method evaluates Bartlett's formula under the additional assumption that the two series have no cross-correlation. The theoretical formula is
For additional special cases of Bartlett's formula, see Box and Jenkins (1976, page 377).An important property of the cross-covariance coefficient is for . This result is used in the computation of the standard error of the sample cross-correlation for lag . In general, the cross-covariance function is not symmetric about zero so both positive and negative lags are of interest.