naginterfaces.library.tsa.multi_​corrmat_​partlag

naginterfaces.library.tsa.multi_corrmat_partlag(n, r0, r)[source]

multi_corrmat_partlag calculates the sample partial lag correlation matrices of a multivariate time series. A set of -statistics and their significance levels are also returned. A call to multi_corrmat_cross() is usually made prior to calling this function in order to calculate the sample cross-correlation matrices.

For full information please refer to the NAG Library document for g13dn

https://www.nag.com/numeric/nl/nagdoc_27.1/flhtml/g13/g13dnf.html

Parameters
nint

, the number of observations in each series.

r0float, array-like, shape

If , then must contain the th element of the sample cross-correlation matrix at lag zero, . If , then must contain the standard deviation of the th series.

rfloat, array-like, shape

must contain the th element of the sample cross-correlation at lag , , for , for , for , where series leads series (see Further Comments).

Returns
maxlagint

The maximum lag up to which partial lag correlation matrices (along with -statistics and their significance levels) have been successfully computed. On a successful exit will equal . If = 2 on exit, will be less than .

parlagfloat, ndarray, shape

contains the th element of the sample partial lag correlation matrix at lag , , for , for , for .

xfloat, ndarray, shape

contains the -statistic at lag , for .

pvaluefloat, ndarray, shape

contains the significance level of the corresponding -statistic in , for .

Raises
NagValueError
(errno )

On entry, and .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

Warns
NagAlgorithmicWarning
(errno )

The recursive equations used to compute the partial lag correlation matrices are ill-conditioned (they have been computed up to lag ).

Notes

Let , for , denote observations of a vector of time series. The partial lag correlation matrix at lag , , is defined to be the correlation matrix between and , after removing the linear dependence on each of the intervening vectors . It is the correlation matrix between the residual vectors resulting from the regression of on the carriers and the regression of on the same set of carriers; see Heyse and Wei (1985).

has the following properties.

  1. If follows a vector autoregressive model of order , then for ;

  2. When , reduces to the univariate partial autocorrelation at lag ;

  3. Each element of is a properly normalized correlation coefficient;

  4. When , is equal to the cross-correlation matrix at lag (a natural property which also holds for the univariate partial autocorrelation function).

Sample estimates of the partial lag correlation matrices may be obtained using the recursive algorithm described in Wei (1990). They are calculated up to lag , which is usually taken to be at most . Only the sample cross-correlation matrices ( , for ) and the standard deviations of the series are required as input to multi_corrmat_partlag. These may be computed by multi_corrmat_cross(). Under the hypothesis that follows an autoregressive model of order , the elements of the sample partial lag matrix , denoted by , are asymptotically Normally distributed with mean zero and variance . In addition the statistic

has an asymptotic -distribution with degrees of freedom. These quantities, , are useful as a diagnostic aid for determining whether the series follows an autoregressive model and, if so, of what order.

References

Heyse, J F and Wei, W W S, 1985, The partial lag autocorrelation function, Technical Report No. 32, Department of Statistics, Temple University, Philadelphia

Wei, W W S, 1990, Time Series Analysis: Univariate and Multivariate Methods, Addison–Wesley