STATESPACE Procedure

Preliminary Autoregressive Models

After computing the sample autocovariance matrices, PROC STATESPACE fits a sequence of vector autoregressive models. These preliminary autoregressive models are used to estimate the autoregressive order of the process and limit the order of the autocovariances considered in the state vector selection process.

Yule-Walker Equations for Forward and Backward Models

Unlike a univariate autoregressive model, a multivariate autoregressive model has different forms, depending on whether the present observation is being predicted from the past observations or from the future observations.

Let bold x Subscript t be the r-component stationary time series given by the VAR statement after differencing and subtracting the vector of sample means. (If the NOCENTER option is specified, the mean is not subtracted.) Let n be the number of observations of bold x Subscript t from the input data set.

Let bold e Subscript t be a vector white noise sequence with mean vector 0 and variance matrix bold upper Sigma Subscript p, and let bold n Subscript t be a vector white noise sequence with mean vector 0 and variance matrix bold upper Omega Subscript p. Let p be the order of the vector autoregressive model for bold x Subscript t.

The forward autoregressive form based on the past observations is written as follows:

bold x Subscript t Baseline equals sigma-summation Underscript i equals 1 Overscript p Endscripts bold upper Phi Subscript i Superscript p Baseline bold x Subscript t minus i Baseline plus bold e Subscript t

The backward autoregressive form based on the future observations is written as follows:

bold x Subscript t Baseline equals sigma-summation Underscript i equals 1 Overscript p Endscripts bold upper Psi Subscript i Superscript p Baseline bold x Subscript t plus i Baseline plus bold n Subscript t

Letting E denote the expected value operator, the autocovariance sequence for the bold x Subscript t series, bold upper Gamma Subscript i, is

bold upper Gamma Subscript i Baseline equals upper E bold x Subscript t Baseline bold x prime Subscript t minus i

The Yule-Walker equations for the autoregressive model that matches the first p elements of the autocovariance sequence are

StartLayout 1st Row  Start 4 By 4 Matrix 1st Row 1st Column bold upper Gamma 0 2nd Column bold upper Gamma 1 3rd Column midline-horizontal-ellipsis 4th Column bold upper Gamma Subscript p minus 1 Baseline 2nd Row 1st Column bold upper Gamma prime 1 2nd Column bold upper Gamma 0 3rd Column midline-horizontal-ellipsis 4th Column bold upper Gamma Subscript p minus 2 Baseline 3rd Row 1st Column vertical-ellipsis 2nd Column vertical-ellipsis 3rd Column Blank 4th Column vertical-ellipsis 4th Row 1st Column bold upper Gamma Subscript p minus 1 Superscript prime Baseline 2nd Column bold upper Gamma Subscript p minus 2 Superscript prime Baseline 3rd Column midline-horizontal-ellipsis 4th Column bold upper Gamma 0 EndMatrix Start 4 By 1 Matrix 1st Row  bold upper Phi 1 Superscript p Baseline 2nd Row  bold upper Phi 2 Superscript p Baseline 3rd Row  vertical-ellipsis 4th Row  bold upper Phi Subscript p Superscript p Baseline EndMatrix equals Start 4 By 1 Matrix 1st Row  bold upper Gamma 1 2nd Row  bold upper Gamma 2 3rd Row  vertical-ellipsis 4th Row  bold upper Gamma Subscript p EndMatrix EndLayout

and

StartLayout 1st Row  Start 4 By 4 Matrix 1st Row 1st Column bold upper Gamma 0 2nd Column bold upper Gamma prime 1 3rd Column midline-horizontal-ellipsis 4th Column bold upper Gamma Subscript p minus 1 Superscript prime Baseline 2nd Row 1st Column bold upper Gamma 1 2nd Column bold upper Gamma 0 3rd Column midline-horizontal-ellipsis 4th Column bold upper Gamma Subscript p minus 2 Superscript prime Baseline 3rd Row 1st Column vertical-ellipsis 2nd Column vertical-ellipsis 3rd Column Blank 4th Column vertical-ellipsis 4th Row 1st Column bold upper Gamma Subscript p minus 1 Baseline 2nd Column bold upper Gamma Subscript p minus 2 Baseline 3rd Column midline-horizontal-ellipsis 4th Column bold upper Gamma 0 EndMatrix Start 4 By 1 Matrix 1st Row  bold upper Psi 1 Superscript p Baseline 2nd Row  bold upper Psi 2 Superscript p Baseline 3rd Row  vertical-ellipsis 4th Row  bold upper Psi Subscript p Superscript p Baseline EndMatrix equals Start 4 By 1 Matrix 1st Row  bold upper Gamma prime 1 2nd Row  bold upper Gamma prime 2 3rd Row  vertical-ellipsis 4th Row  bold upper Gamma prime Subscript p EndMatrix EndLayout

Here bold upper Phi Subscript i Superscript p are the coefficient matrices for the past observation form of the vector autoregressive model, and bold upper Psi Subscript i Superscript p are the coefficient matrices for the future observation form. More information about the Yule-Walker equations in the multivariate setting can be found in Whittle (1963); Ansley and Newbold (1979).

The innovation variance matrices for the two forms can be written as follows:

bold upper Sigma Subscript p Baseline equals bold upper Gamma 0 minus sigma-summation Underscript i equals 1 Overscript p Endscripts bold upper Phi Subscript i Superscript p Baseline bold upper Gamma prime Subscript i
bold upper Omega Subscript p Baseline equals bold upper Gamma 0 minus sigma-summation Underscript i equals 1 Overscript p Endscripts bold upper Psi Subscript i Superscript p Baseline bold upper Gamma Subscript i

The autoregressive models are fit to the data by using the preceding Yule-Walker equations with bold upper Gamma Subscript i replaced by the sample covariance sequence bold upper C Subscript bold i. The covariance matrices are calculated as

bold upper C Subscript i Baseline equals StartFraction 1 Over upper N minus 1 EndFraction sigma-summation Underscript t equals i plus 1 Overscript upper N Endscripts bold x Subscript t Baseline bold x prime Subscript t minus i

Let ModifyingAbove bold upper Phi With caret Subscript p, ModifyingAbove bold upper Psi With caret Subscript p, ModifyingAbove bold upper Sigma With caret Subscript p, and ModifyingAbove bold upper Omega With caret Subscript p represent the Yule-Walker estimates of bold upper Phi Subscript p, bold upper Psi Subscript p, bold upper Sigma Subscript p, and bold upper Omega Subscript p, respectively. These matrices are written to an output data set when the OUTAR= option is specified.

When the PRINTOUT=LONG option is specified, the sequence of matrices ModifyingAbove bold upper Sigma With caret Subscript p and the corresponding correlation matrices are printed. The sequence of matrices ModifyingAbove bold upper Sigma With caret Subscript p is used to compute Akaike’s information criteria for selection of the autoregressive order of the process.

Akaike’s Information Criterion

Akaike’s information criterion (AIC) is defined as –2(maximum of log likelihood )+2(number of parameters). Since the vector autoregressive models are estimates from the Yule-Walker equations, not by maximum likelihood, the exact likelihood values are not available for computing the AIC. However, for the vector autoregressive model the maximum of the log likelihood can be approximated as

ln left-parenthesis upper L right-parenthesis almost-equals minus StartFraction n Over 2 EndFraction ln left-parenthesis StartAbsoluteValue ModifyingAbove bold upper Sigma With caret Subscript p Baseline EndAbsoluteValue right-parenthesis

Thus, the AIC for the order p model is computed as

normal upper A normal upper I normal upper C Subscript p Baseline equals n ln left-parenthesis StartAbsoluteValue ModifyingAbove bold upper Sigma With caret Subscript p Baseline EndAbsoluteValue right-parenthesis plus 2 p r squared

You can use the printed AIC array to compute a likelihood ratio test of the autoregressive order. The log-likelihood ratio test statistic for testing the order p model against the order p minus 1 model is

minus n ln left-parenthesis StartAbsoluteValue ModifyingAbove bold upper Sigma With caret Subscript p Baseline EndAbsoluteValue right-parenthesis plus n ln left-parenthesis StartAbsoluteValue ModifyingAbove bold upper Sigma With caret Subscript p minus 1 Baseline EndAbsoluteValue right-parenthesis

This quantity is asymptotically distributed as a chi squared with r squared degrees of freedom if the series is autoregressive of order p minus 1. It can be computed from the AIC array as

normal upper A normal upper I normal upper C Subscript p minus 1 Baseline minus normal upper A normal upper I normal upper C Subscript p plus 2 r squared

You can evaluate the significance of these test statistics with the PROBCHI function in a SAS DATA step or with a chi squared table.

Determining the Autoregressive Order

Although the autoregressive models can be used for prediction, their primary value is to aid in the selection of a suitable portion of the sample covariance matrix for use in computing canonical correlations. If the multivariate time series bold x Subscript t is of autoregressive order p, then the vector of past values to lag p is considered to contain essentially all the information relevant for prediction of future values of the time series.

By default, PROC STATESPACE selects the order p that produces the autoregressive model with the smallest normal upper A normal upper I normal upper C Subscript p. If the value p for the minimum normal upper A normal upper I normal upper C Subscript p is less than the value of the PASTMIN= option, then p is set to the PASTMIN= value. Alternatively, you can use the ARMAX= and PASTMIN= options to force PROC STATESPACE to use an order you select.

Significance Limits for Partial Autocorrelations

The STATESPACE procedure prints a schematic representation of the partial autocorrelation matrices that indicates which partial autocorrelations are significantly greater than or significantly less than 0. Figure 11 shows an example of this table.

Figure 11: Significant Partial Autocorrelations

Schematic Representation of Partial
Autocorrelations
Name/Lag 1 2 3 4 5 6 7 8 9 10
x ++ +. .. .. .. .. .. .. .. ..
y ++ .. .. .. .. .. .. .. .. ..
+ is > 2*std error,  - is < -2*std error,  . is between


The partial autocorrelations are from the sample partial autoregressive matrices ModifyingAbove bold upper Phi With caret Subscript p Superscript p. The standard errors used for the significance limits of the partial autocorrelations are computed from the sequence of matrices bold upper Sigma Subscript p and bold upper Omega Subscript p.

Under the assumption that the observed series arises from an autoregressive process of order p minus 1, the pth sample partial autoregressive matrix ModifyingAbove bold upper Phi With caret Subscript p Superscript p has an asymptotic variance matrix StartFraction 1 Over n EndFraction bold upper Omega Subscript p Superscript negative 1 circled-times bold upper Sigma Subscript p.

The significance limits for ModifyingAbove bold upper Phi With caret Subscript p Superscript p used in the schematic plot of the sample partial autoregressive sequence are derived by replacing bold upper Omega Subscript p and bold upper Sigma Subscript p with their sample estimators to produce the variance estimate, as follows:

StartLayout 1st Row  ModifyingAbove upper V a r With caret left-parenthesis ModifyingAbove bold upper Phi With caret Subscript p Superscript p Baseline right-parenthesis equals left-parenthesis StartFraction 1 Over n minus r p EndFraction right-parenthesis ModifyingAbove bold upper Omega With caret Subscript p Superscript negative 1 Baseline circled-times ModifyingAbove bold upper Sigma With caret Subscript p EndLayout
Last updated: June 19, 2025