nag_tsa_auto_corr_part (g13acc)

+− Contents

1 Purpose

nag_tsa_auto_corr_part (g13acc) calculates partial autocorrelation coefficients given a set of autocorrelation coefficients. It also calculates the predictor error variance ratios for increasing order of finite lag autoregressive predictor, and the autoregressive parameters associated with the predictor of maximum order.

2 Specification

3 Description

The data consist of values of autocorrelation coefficients r1,r2,…,rK, relating to lags 1,2,…,K. These will generally (but not necessarily) be sample values such as may be obtained from a time series xt using nag_tsa_auto_corr (g13abc).

The partial autocorrelation coefficient at lag l may be identified with the parameter pl,l in the autoregression

xt=cl+pl,1xt-1+pl,2xt-2+⋯+pl,lxt-l+el,t

where el,t is the predictor error.

The first subscript l of pl,l and el,t emphasizes the fact that the parameters will in general alter as further terms are introduced into the equation (i.e., as l is increased).

The parameters are determined from the autocorrelation coefficients by the Yule–Walker equations

ri=pl,1ri-1+pl,2ri-2+⋯+pl,lri-l, i=1,2,…,l

taking rj=rj when j<0, and r0=1.

The predictor error variance ratio vl=varel,t/varxt is defined by

vl=1-pl,1r1-pl,2r2-⋯-pl,lrl.

The above sets of equations are solved by a recursive method (the Durbin–Levinson algorithm). The recursive cycle applied for l=1,2,…,L-1, where L is the number of partial autocorrelation coefficients required, is initialized by setting p1,1=r1 and v1=1-r12.

If the condition pl,l≥1 occurs, say when l=l0, it indicates that the supplied autocorrelation coefficients do not form a positive definite sequence (see Hannan (1960)), and the recursion is not continued. The autoregressive parameters are overwritten at each recursive step, so that upon completion the only available values are pLj, for j=1,2,…,L, or pl0-1,j if the recursion has been prematurely halted.

6 Error Indicators and Warnings

On entry, nk=value while nl=value. These parameters must satisfy nk≥nl.

NE_CORR_NOT_POS_DEF

Recursion has been prematurely terminated; the supplied autocorrelation coefficients do not form a positive definite sequence. Argument nvl returns the number of valid values computed.

NE_INT_ARG_LE

On entry, nk=value.
Constraint: nk>0.

On entry, nl=value.
Constraint: nl>0.

NE_INVALID_AUTOCO_COEF

On entry, the autocorrelation coefficient of lag 1 has an absolute value greater than or equal to 1.0; no recursions could be performed.

7 Accuracy

The computations are believed to be stable.

8 Further Comments

The time taken by nag_tsa_auto_corr_part (g13acc) is proportional to nvl2.

9 Example

This example uses an input series of 10 sample autocorrelation coefficients derived from the original series of sunspot numbers generated by the nag_tsa_auto_corr (g13abc) example program. The results show five values of each of the three output arrays: partial autocorrelation coefficients, predictor error variance ratios and autoregressive parameters. All of these were valid.