g13ac 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.
Public Shared Sub g13ac ( _ r As Double(), _ nk As Integer, _ nl As Integer, _ p As Double(), _ v As Double(), _ ar As Double(), _ <OutAttribute> ByRef nvl As Integer, _ <OutAttribute> ByRef ifail As Integer _ )
public: static void g13ac( array<double>^ r, int nk, int nl, array<double>^ p, array<double>^ v, array<double>^ ar, [OutAttribute] int% nvl, [OutAttribute] int% ifail )
- Type: array<System..::..Double>()An array of size [nk]On entry: the autocorrelation coefficient relating to lag , for .
- Type: System..::..Int32On entry: , the number of lags. The lags range from to and do not include zero.Constraint: .
- Type: System..::..Int32On entry: , the number of partial autocorrelation coefficients required.Constraint: .
- Type: array<System..::..Double>()On exit: contains the partial autocorrelation coefficient at lag , , for .
- Type: array<System..::..Double>()On exit: contains the predictor error variance ratio , for .
- Type: array<System..::..Double>()On exit: the autoregressive parameters of maximum order, i.e., if , or if , for .
- Type: System..::..Int32%
The data consist of values of autocorrelation coefficients , relating to lags . These will generally (but not necessarily) be sample values such as may be obtained from a time series using g13ab.
The partial autocorrelation coefficient at lag may be identified with the parameter in the autoregression
where is the predictor error.
The first subscript of and emphasizes the fact that the parameters will in general alter as further terms are introduced into the equation (i.e., as is increased).
The parameters are determined from the autocorrelation coefficients by the Yule–Walker equations
taking when , and .
The predictor error variance ratio is defined by
The above sets of equations are solved by a recursive method (the Durbin–Levinson algorithm). The recursive cycle applied for , where is the number of partial autocorrelation coefficients required, is initialized by setting and .
If the condition occurs, say when , 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 , for , or if the recursion has been prematurely halted.
Box G E P and Jenkins G M (1976) Time Series Analysis: Forecasting and Control (Revised Edition) Holden–Day
Durbin J (1960) The fitting of time series models Rev. Inst. Internat. Stat. 28 233
Hannan E J (1960) Time Series Analysis Methuen
Errors or warnings detected by the method:
On entry, , or , or .
- On entry, the autocorrelation coefficient of lag has an absolute value greater than or equal to ; no recursions could be performed.
The computations are believed to be stable.
The time taken by g13ac is proportional to .