Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

Chapter Contents
Chapter Introduction
NAG Toolbox

# NAG Toolbox: nag_tsa_multi_varma_diag (g13ds)

## Purpose

nag_tsa_multi_varma_diag (g13ds) is a diagnostic checking function suitable for use after fitting a vector ARMA model to a multivariate time series using nag_tsa_multi_varma_estimate (g13dd). The residual cross-correlation matrices are returned along with an estimate of their asymptotic standard errors and correlations. Also, nag_tsa_multi_varma_diag (g13ds) calculates the modified Li–McLeod portmanteau statistic and its significance level for testing model adequacy.

## Syntax

[qq, r0, r, rcm, chi, idf, siglev, ifail] = g13ds(v, ip, iq, m, par, parhld, qq, ishow, 'k', k, 'n', n)
[qq, r0, r, rcm, chi, idf, siglev, ifail] = nag_tsa_multi_varma_diag(v, ip, iq, m, par, parhld, qq, ishow, 'k', k, 'n', n)

## Description

Let ${W}_{\mathit{t}}={\left({w}_{1\mathit{t}},{w}_{2\mathit{t}},\dots ,{w}_{\mathit{k}\mathit{t}}\right)}^{\mathrm{T}}$, for $\mathit{t}=1,2,\dots ,n$, denote a vector of $k$ time series which is assumed to follow a multivariate ARMA model of the form
 $Wt-μ= ϕ1Wt-1-μ+ϕ2Wt-2-μ+⋯+ϕpWt-p-μ +εt-θ1εt-1-θ2εt-2-⋯-θqεt-q,$ (1)
where ${\epsilon }_{\mathit{t}}={\left({\epsilon }_{1\mathit{t}},{\epsilon }_{2\mathit{t}},\dots ,{\epsilon }_{k\mathit{t}}\right)}^{\mathrm{T}}$, for $\mathit{t}=1,2,\dots ,n$, is a vector of $k$ residual series assumed to be Normally distributed with zero mean and positive definite covariance matrix $\Sigma$. The components of ${\epsilon }_{t}$ are assumed to be uncorrelated at non-simultaneous lags. The ${\varphi }_{i}$ and ${\theta }_{j}$ are $k$ by $k$ matrices of parameters. $\left\{{\varphi }_{\mathit{i}}\right\}$, for $\mathit{i}=1,2,\dots ,p$, are called the autoregressive (AR) parameter matrices, and $\left\{{\theta }_{\mathit{i}}\right\}$, for $\mathit{i}=1,2,\dots ,q$, the moving average (MA) parameter matrices. The parameters in the model are thus the $p$ ($k$ by $k$) $\varphi$-matrices, the $q$ ($k$ by $k$) $\theta$-matrices, the mean vector $\mu$ and the residual error covariance matrix $\Sigma$. Let
 $Aϕ= ϕ1 I 0 . . . 0 ϕ2 0 I 0 . . 0 . . . . . . ϕp-1 0 . . . 0 I ϕp 0 . . . 0 0 pk×pk and Bθ= θ1 I 0 . . . 0 θ2 0 I 0 . . 0 . . . . . . θq-1 0 . . . I θq 0 . . . . 0 qk×qk$
where $I$ denotes the $k$ by $k$ identity matrix.
The ARMA model (1) is said to be stationary if the eigenvalues of $A\left(\varphi \right)$ lie inside the unit circle, and invertible if the eigenvalues of $B\left(\theta \right)$ lie inside the unit circle. The ARMA model is assumed to be both stationary and invertible. Note that some of the elements of the $\varphi$- and/or $\theta$-matrices may have been fixed at pre-specified values (for example by calling nag_tsa_multi_varma_estimate (g13dd)).
The estimated residual cross-correlation matrix at lag $l$ is defined to the $k$ by $k$ matrix ${\stackrel{^}{R}}_{l}$ whose $\left(i,j\right)$th element is computed as
 $r ^ i j l = ∑ t = l + 1 n ε ^ i t - l - ε - i ε ^ j t - ε - j ∑ t = 1 n ε ^ i t - ε - i 2 ∑ t = 1 n ε ^ j t - ε - j 2 , l =0,1,…,i​ and ​j=1,2,…,k ,$
where ${\stackrel{^}{\epsilon }}_{it}$ denotes an estimate of the $t$th residual for the $i$th series ${\epsilon }_{it}$ and ${\stackrel{-}{\epsilon }}_{i}=\sum _{t=1}^{n}{\stackrel{^}{\epsilon }}_{it}/n$. (Note that ${\stackrel{^}{R}}_{l}$ is an estimate of $E\left({\epsilon }_{t-l}{\epsilon }_{t}^{\mathrm{T}}\right)$, where $E$ is the expected value.)
A modified portmanteau statistic, ${Q}_{\left(m\right)}^{*}$, is calculated from the formula (see Li and McLeod (1981))
 $Qm * = k2 mm+1 2n + n ∑ l=1 m r^ lT R^ 0 -1 ⊗ R^ 0 -1 r^ l ,$
where $\otimes$ denotes Kronecker product, ${\stackrel{^}{R}}_{0}$ is the estimated residual cross-correlation matrix at lag zero and $\stackrel{^}{r}\left(l\right)=\mathrm{vec}\left({\stackrel{^}{R}}_{l}^{\mathrm{T}}\right)$, where $\text{vec}$ of a $k$ by $k$ matrix is a vector with the $\left(i,j\right)$th element in position $\left(i-1\right)k+j$. $m$ denotes the number of residual cross-correlation matrices computed. (Advice on the choice of $m$ is given in Choice of .) Let ${l}_{C}$ denote the total number of ‘free’ parameters in the ARMA model excluding the mean, $\mu$, and the residual error covariance matrix $\Sigma$. Then, under the hypothesis of model adequacy, ${Q}_{\left(m\right)}^{*}$, has an asymptotic ${\chi }^{2}$-distribution on $m{k}^{2}-{l}_{C}$ degrees of freedom.
Let $\underline{\stackrel{^}{r}}=\left(\mathrm{vec}\left({R}_{1}^{\mathrm{T}}\right),\mathrm{vec}\left({R}_{2}^{\mathrm{T}}\right),\dots ,\mathrm{vec}\left({R}_{m}^{\mathrm{T}}\right)\right)$ then the covariance matrix of $\underline{\stackrel{^}{r}}$ is given by
 $Varr̲^=Y-XXTGGTX-1XT/n,$
where $Y={I}_{m}\otimes \left(\Delta \otimes \Delta \right)$ and $G={I}_{m}\left(G{G}^{\mathrm{T}}\right)$. $\Delta$ is the dispersion matrix $\Sigma$ in correlation form and $G$ a nonsingular $k$ by $k$ matrix such that $G{G}^{\mathrm{T}}={\Delta }^{-1}$ and $G\Delta {G}^{\mathrm{T}}={I}_{k}$. The construction of the matrix $X$ is discussed in Li and McLeod (1981). (Note that the mean, $\mu$, plays no part in calculating $\mathrm{Var}\left(\stackrel{^}{\underline{r}}\right)$ and therefore is not required as input to nag_tsa_multi_varma_diag (g13ds).)

## References

Li W K and McLeod A I (1981) Distribution of the residual autocorrelations in multivariate ARMA time series models J. Roy. Statist. Soc. Ser. B 43 231–239

## Parameters

The output quantities k, n, v, kmax, ip, iq, par, parhld and qq from nag_tsa_multi_varma_estimate (g13dd) are suitable for input to nag_tsa_multi_varma_diag (g13ds).

### Compulsory Input Parameters

1:     $\mathrm{v}\left(\mathit{kmax},{\mathbf{n}}\right)$ – double array
kmax, the first dimension of the array, must satisfy the constraint $\mathit{kmax}\ge {\mathbf{k}}$.
${\mathbf{v}}\left(\mathit{i},\mathit{t}\right)$ must contain an estimate of the $\mathit{i}$th component of ${\epsilon }_{\mathit{t}}$, for $\mathit{i}=1,2,\dots ,k$ and $\mathit{t}=1,2,\dots ,n$.
Constraints:
• no two rows of ${\mathbf{v}}$ may be identical;
• in each row there must be at least two distinct elements.
2:     $\mathrm{ip}$int64int32nag_int scalar
$p$, the number of AR parameter matrices.
Constraint: ${\mathbf{ip}}\ge 0$.
3:     $\mathrm{iq}$int64int32nag_int scalar
$q$, the number of MA parameter matrices.
Constraint: ${\mathbf{iq}}\ge 0$.
Note: ${\mathbf{ip}}={\mathbf{iq}}=0$ is not permitted.
4:     $\mathrm{m}$int64int32nag_int scalar
The value of $m$, the number of residual cross-correlation matrices to be computed. See Choice of for advice on the choice of m.
Constraint: ${\mathbf{ip}}+{\mathbf{iq}}<{\mathbf{m}}<{\mathbf{n}}$.
5:     $\mathrm{par}\left(\left({\mathbf{ip}}+{\mathbf{iq}}\right)×{\mathbf{k}}×{\mathbf{k}}\right)$ – double array
The parameter estimates read in row by row in the order ${\varphi }_{1},{\varphi }_{2},\dots ,{\varphi }_{p}$, ${\theta }_{1},{\theta }_{2},\dots ,{\theta }_{q}$.
Thus,
• if ${\mathbf{ip}}>0$, ${\mathbf{par}}\left(\left(\mathit{l}-1\right)×k×k+\left(\mathit{i}-1\right)×k+j\right)$ must be set equal to an estimate of the $\left(\mathit{i},j\right)$th element of ${\varphi }_{\mathit{l}}$, for $\mathit{l}=1,2,\dots ,p$ and $\mathit{i}=1,2,\dots ,k$;
• if ${\mathbf{iq}}\ge 0$, ${\mathbf{par}}\left(p×k×k+\left(\mathit{l}-1\right)×k×k+\left(\mathit{i}-1\right)×k+j\right)$ must be set equal to an estimate of the $\left(\mathit{i},j\right)$th element of ${\theta }_{\mathit{l}}$, for $\mathit{l}=1,2,\dots ,q$ and $\mathit{i}=1,2,\dots ,k$.
The first $p×k×k$ elements of par must satisfy the stationarity condition and the next $q×k×k$ elements of par must satisfy the invertibility condition.
6:     $\mathrm{parhld}\left(\left({\mathbf{ip}}+{\mathbf{iq}}\right)×{\mathbf{k}}×{\mathbf{k}}\right)$ – logical array
${\mathbf{parhld}}\left(\mathit{i}\right)$ must be set to true if ${\mathbf{par}}\left(\mathit{i}\right)$ has been held constant at a pre-specified value and false if ${\mathbf{par}}\left(\mathit{i}\right)$ is a free parameter, for $\mathit{i}=1,2,\dots ,\left(p+q\right)×k×k$.
7:     $\mathrm{qq}\left(\mathit{kmax},{\mathbf{k}}\right)$ – double array
kmax, the first dimension of the array, must satisfy the constraint $\mathit{kmax}\ge {\mathbf{k}}$.
${\mathbf{qq}}\left(i,j\right)$ is an efficient estimate of the $\left(i,j\right)$th element of $\Sigma$. The lower triangle only is needed.
Constraint: ${\mathbf{qq}}$ must be positive definite.
8:     $\mathrm{ishow}$int64int32nag_int scalar
Must be nonzero if the residual cross-correlation matrices $\left\{{\stackrel{^}{r}}_{ij}\left(l\right)\right\}$ and their standard errors $\left\{\mathrm{se}\left({\stackrel{^}{r}}_{ij}\left(l\right)\right)\right\}$, the modified portmanteau statistic with its significance and a summary table are to be printed. The summary table indicates which elements of the residual correlation matrices are significant at the $5%$ level in either a positive or negative direction; i.e., if ${\stackrel{^}{r}}_{ij}\left(l\right)>1.96×\mathrm{se}\left({\stackrel{^}{r}}_{ij}\left(l\right)\right)$ then a ‘$+$’ is printed, if ${\stackrel{^}{r}}_{ij}\left(l\right)<-1.96×\mathrm{se}\left({\stackrel{^}{r}}_{ij}\left(l\right)\right)$ then a ‘$-$’ is printed, otherwise a fullstop (.) is printed. The summary table is only printed if $k\le 6$ on entry.
The residual cross-correlation matrices, their standard errors and the modified portmanteau statistic with its significance are available also as output variables in r, rcm, chi, idf and siglev.

### Optional Input Parameters

1:     $\mathrm{k}$int64int32nag_int scalar
Default: the first dimension of the arrays v, qq and the second dimension of the array qq. (An error is raised if these dimensions are not equal.)
$k$, the number of residual time series.
Constraint: ${\mathbf{k}}\ge 1$.
2:     $\mathrm{n}$int64int32nag_int scalar
Default: the second dimension of the array v.
$n$, the number of observations in each residual series.

### Output Parameters

1:     $\mathrm{qq}\left(\mathit{kmax},{\mathbf{k}}\right)$ – double array
If ${\mathbf{ifail}}\ne {\mathbf{1}}$, then the upper triangle is set equal to the lower triangle.
2:     $\mathrm{r0}\left(\mathit{kmax},{\mathbf{k}}\right)$ – double array
If $i\ne j$, then ${\mathbf{r0}}\left(i,j\right)$ contains an estimate of the $\left(i,j\right)$th element of the residual cross-correlation matrix at lag zero, ${\stackrel{^}{R}}_{0}$. When $i=j$, ${\mathbf{r0}}\left(i,j\right)$ contains the standard deviation of the $i$th residual series. If ${\mathbf{ifail}}={\mathbf{3}}$ on exit then the first k rows and columns of r0 are set to zero.
3:     $\mathrm{r}\left(\mathit{kmax},\mathit{kmax},{\mathbf{m}}\right)$ – double array
${\mathbf{r}}\left(\mathit{l},\mathit{i},\mathit{j}\right)$ is an estimate of the $\left(\mathit{i},\mathit{j}\right)$th element of the residual cross-correlation matrix at lag $\mathit{l}$, for $\mathit{i}=1,2,\dots ,k$, $\mathit{j}=1,2,\dots ,k$ and $\mathit{l}=1,2,\dots ,m$. If ${\mathbf{ifail}}={\mathbf{3}}$ on exit then all elements of r are set to zero.
4:     $\mathrm{rcm}\left(\mathit{ldrcm},{\mathbf{m}}×{\mathbf{k}}×{\mathbf{k}}\right)$ – double array
The estimated standard errors and correlations of the elements in the array r. The correlation between ${\mathbf{r}}\left(l,i,j\right)$ and ${\mathbf{r}}\left({l}_{2},{i}_{2},{j}_{2}\right)$ is returned as ${\mathbf{rcm}}\left(s,t\right)$ where $s=\left(l-1\right)×k×k+\left(j-1\right)×k+i$ and $t=\left({l}_{2}-1\right)×k×k+\left({j}_{2}-1\right)×k+{i}_{2}$ except that if $s=t$, then ${\mathbf{rcm}}\left(s,t\right)$ contains the standard error of ${\mathbf{r}}\left(l,i,j\right)$. If on exit, ${\mathbf{ifail}}\ge {\mathbf{5}}$, then all off-diagonal elements of rcm are set to zero and all diagonal elements are set to $1/\sqrt{n}$.
5:     $\mathrm{chi}$ – double scalar
The value of the modified portmanteau statistic, ${Q}_{\left(m\right)}^{*}$. If ${\mathbf{ifail}}={\mathbf{3}}$ on exit then chi is returned as zero.
6:     $\mathrm{idf}$int64int32nag_int scalar
The number of degrees of freedom of chi.
7:     $\mathrm{siglev}$ – double scalar
The significance level of chi based on idf degrees of freedom. If ${\mathbf{ifail}}={\mathbf{3}}$ on exit, siglev is returned as one.
8:     $\mathrm{ifail}$int64int32nag_int scalar
${\mathbf{ifail}}={\mathbf{0}}$ unless the function detects an error (see Error Indicators and Warnings).

## Error Indicators and Warnings

Note: nag_tsa_multi_varma_diag (g13ds) may return useful information for one or more of the following detected errors or warnings.
Errors or warnings detected by the function:

Cases prefixed with W are classified as warnings and do not generate an error of type NAG:error_n. See nag_issue_warnings.

${\mathbf{ifail}}=1$
 On entry, ${\mathbf{k}}<1$, or $\mathit{kmax}<{\mathbf{k}}$, or ${\mathbf{ip}}<0$, or ${\mathbf{iq}}<0$, or ${\mathbf{ip}}={\mathbf{iq}}=0$, or ${\mathbf{m}}\le {\mathbf{ip}}+{\mathbf{iq}}$, or ${\mathbf{m}}\ge {\mathbf{n}}$, or $\mathit{ldrcm}<{\mathbf{m}}×{\mathbf{k}}×{\mathbf{k}}$, or liw is too small, or lwork is too small.
${\mathbf{ifail}}=2$
On entry, either qq is not positive definite or the autoregressive parameter matrices are extremely close to or outside the stationarity region, or the moving average parameter matrices are extremely close to or outside the invertibility region. To proceed, you must supply different parameter estimates in the arrays par and qq.
W  ${\mathbf{ifail}}=3$
On entry, at least one of the $k$ residual series is such that all its elements are practically identical giving zero (or near zero) variance or at least two of the residual series are identical. In this case chi is set to zero, siglev to one and all the elements of r0 and r set to zero.
${\mathbf{ifail}}=4$
This is an unlikely exit brought about by an excessive number of iterations being needed to evaluate the zeros of the determinantal polynomials $\mathrm{det}\left(A\left(\varphi \right)\right)$ and $\mathrm{det}\left(B\left(\theta \right)\right)$. All output arguments are undefined.
${\mathbf{ifail}}=5$
On entry, either the eigenvalues and eigenvectors of $\Delta$ (the matrix qq in correlation form) could not be computed or the determinantal polynomials $\mathrm{det}\left(A\left(\varphi \right)\right)$ and $\mathrm{det}\left(B\left(\theta \right)\right)$ have a factor in common. To proceed, you must either supply different parameter estimates in the array qq or delete this common factor from the model. In this case, the off-diagonal elements of rcm are returned as zero and the diagonal elements set to $1/\sqrt{n}$. All other output quantities will be correct.
${\mathbf{ifail}}=6$
This is an unlikely exit. At least one of the diagonal elements of rcm was found to be either negative or zero. In this case all off-diagonal elements of rcm are returned as zero and all diagonal elements of rcm set to $1/\sqrt{n}$.
${\mathbf{ifail}}=-99$
${\mathbf{ifail}}=-399$
Your licence key may have expired or may not have been installed correctly.
${\mathbf{ifail}}=-999$
Dynamic memory allocation failed.

## Accuracy

The computations are believed to be stable.

### Timing

The time taken by nag_tsa_multi_varma_diag (g13ds) depends upon the number of residual cross-correlation matrices to be computed, $m$, and the number of time series, $k$.

### Choice of m

The number of residual cross-correlation matrices to be computed, $m$, should be chosen to ensure that when the ARMA model (1) is written as either an infinite order autoregressive process, i.e.,
 $Wt-μ=∑j=1∞πjWt-j-μ+εt$
or as an infinite order moving average process, i.e.,
 $Wt-μ=∑j= 1∞ψjεt-j+εt$
then the two sequences of $k$ by $k$ matrices $\left\{{\pi }_{1},{\pi }_{2},\dots \right\}$ and $\left\{{\psi }_{1},{\psi }_{2},\dots \right\}$ are such that ${\pi }_{j}$ and ${\psi }_{j}$ are approximately zero for $j>m$. An overestimate of $m$ is therefore preferable to an under-estimate of $m$. In many instances the choice $m=10$ will suffice. In practice, to be on the safe side, you should try setting $m=20$.

### Checking a ‘White Noise’ Model

If you have fitted the ‘white noise’ model
 $Wt-μ=εt$
then nag_tsa_multi_varma_diag (g13ds) should be entered with $p=1$, $q=0$, and the first ${k}^{2}$ elements of par and parhld set to zero and true respectively.

### Approximate Standard Errors

When ${\mathbf{ifail}}={\mathbf{5}}$ or ${\mathbf{6}}$ all the standard errors in rcm are set to $1/\sqrt{n}$. This is the asymptotic standard error of ${\stackrel{^}{r}}_{ij}\left(l\right)$ when all the autoregressive and moving average parameters are assumed to be known rather than estimated.

### Alternative Tests

${\stackrel{^}{R}}_{0}$ is useful in testing for instantaneous causality. If you wish to carry out a likelihood ratio test then the covariance matrix at lag zero $\left({\stackrel{^}{C}}_{0}\right)$ can be used. It can be recovered from ${\stackrel{^}{R}}_{0}$ by setting
 $C^0i,j =R^0i,j×R^0i,i×R^0j,j, for ​i≠j =R^0i,j×R^0i,j, for ​i=j$

## Example

This example fits a bivariate AR(1) model to two series each of length $48$. $\mu$ has been estimated but ${\varphi }_{1}\left(2,1\right)$ has been constrained to be zero. Ten residual cross-correlation matrices are to be computed.
```function g13ds_example

fprintf('g13ds example results\n\n');

w = [ -1.49 -1.62  5.20  6.23  6.21  5.86  4.09  3.18  2.62  1.49 ...
1.17  0.85 -0.35  0.24  2.44  2.58  2.04  0.40  2.26  3.34 ...
5.09  5.00  4.78  4.11  3.45  1.65  1.29  4.09  6.32  7.50 ...
3.89  1.58  5.21  5.25  4.93  7.38  5.87  5.81  9.68  9.07 ...
7.29  7.84  7.55  7.32  7.97  7.76  7.00  8.350;
7.34  6.35  6.96  8.54  6.62  4.97  4.55  4.81  4.75  4.76 ...
10.88 10.01 11.62 10.36  6.40  6.24  7.93  4.04  3.73  5.60 ...
5.35  6.81  8.27  7.68  6.65  6.08 10.25  9.14 17.75 13.30 ...
9.63  6.80  4.08  5.06  4.94  6.65  7.94 10.76 11.89  5.85 ...
9.01  7.50 10.02 10.38  8.15  8.37 10.73 12.14];

[k, n] = size(w);
ip = int64(1);
iq = int64(0);
mean_p = true;
m = int64(10);

% Control parameters
iprint = int64(-1);
cgetol =  0.0001;
dishow = int64(2);
ishow  = int64(1);
exact = true;

% Initial parameters estimates and hold flags
par    = zeros(6,1);
parhld = [false;  false;  true;  false;  false;  false];

% Initial covariance matrix
qq = zeros(k,k);

% Fit VARMA model
[par, qq, niter, rlogl, v, g, cm, ifail] = ...
g13dd( ...
ip, iq, mean_p, par, qq, w, parhld, exact, iprint, cgetol, dishow);

fprintf('\nOutput from g13ds\n\n');

% Display diagnostics
[qq, r0, r, rcm, chi, idf, siglev, ifail] = ...
g13ds( ...
v, ip, iq, m, par, parhld, qq, ishow);

```
```g13ds example results

VALUE OF LOG LIKELIHOOD FUNCTION ON EXIT = -0.20280E+03

MAXIMUM LIKELIHOOD ESTIMATES OF AR PARAMETER MATRICES
-----------------------------------------------------

PHI(1)    ROW-WISE :    0.802   0.065
( 0.091)( 0.102)

0.000   0.575
( 0.000)( 0.121)

MAXIMUM LIKELIHOOD ESTIMATE OF PROCESS MEAN
-------------------------------------------

4.271   7.825
( 1.219)( 0.776)

MAXIMUM LIKELIHOOD ESTIMATE OF SIGMA MATRIX
-------------------------------------------

2.964

0.637   5.380

RESIDUAL SERIES NUMBER  1
-------------------------

T     1      2      3      4      5      6      7      8
V(T)  -3.33  -1.24   5.75   1.27   0.32   0.11  -1.27  -0.73

T     9     10     11     12     13     14     15     16
V(T)  -0.58  -1.26  -0.67  -1.13  -2.02  -0.57   1.24  -0.13

T    17     18     19     20     21     22     23     24
V(T)  -0.77  -2.09   1.34   0.95   1.71   0.23  -0.01  -0.60

T    25     26     27     28     29     30     31     32
V(T)  -0.68  -1.89  -0.77   2.05   2.11   0.94  -3.32  -2.50

T    33     34     35     36     37     38     39     40
V(T)   3.16   0.47   0.05   2.77  -0.82   0.25   3.99   0.20

T    41     42     43     44     45     46     47     48
V(T)  -0.70   1.07   0.44   0.28   1.09   0.50  -0.10   1.70

RESIDUAL SERIES NUMBER  2
-------------------------

T     1      2      3      4      5      6      7      8
V(T)  -0.19  -1.20  -0.02   1.21  -1.62  -2.16  -1.63  -1.13

T     9     10     11     12     13     14     15     16
V(T)  -1.34  -1.30   4.82   0.43   2.54   0.35  -2.88  -0.77

T    17     18     19     20     21     22     23     24
V(T)   1.02  -3.85  -1.92   0.13  -1.20   0.41   1.03  -0.40

T    25     26     27     28     29     30     31     32
V(T)  -1.09  -1.07   3.43  -0.08   9.17  -0.23  -1.34  -2.06

T    33     34     35     36     37     38     39     40
V(T)  -3.16  -0.61  -1.30   0.48   0.79   2.87   2.38  -4.31

T    41     42     43     44     45     46     47     48
V(T)   2.32  -1.01   2.38   1.29  -1.14   0.36   2.59   2.64

Output from g13ds

RESIDUAL CROSS-CORRELATION MATRICES
-----------------------------------

LAG     1           :    0.130   0.112
( 0.119)( 0.143)
0.094   0.043
( 0.069)( 0.102)

LAG     2           :   -0.312   0.021
( 0.128)( 0.144)
-0.162   0.098
( 0.125)( 0.132)

LAG     3           :    0.004  -0.176
( 0.134)( 0.144)
-0.168  -0.091
( 0.139)( 0.140)

LAG     4           :   -0.090  -0.120
( 0.137)( 0.144)
0.099  -0.232
( 0.142)( 0.143)

LAG     5           :    0.041   0.093
( 0.140)( 0.144)
-0.009  -0.089
( 0.144)( 0.144)

LAG     6           :    0.234  -0.008
( 0.141)( 0.144)
0.069  -0.103
( 0.144)( 0.144)

LAG     7           :   -0.076   0.007
( 0.142)( 0.144)
0.168   0.000
( 0.144)( 0.144)

LAG     8           :   -0.074   0.559
( 0.143)( 0.144)
0.008  -0.101
( 0.144)( 0.144)

LAG     9           :    0.091   0.193
( 0.144)( 0.144)
0.055   0.170
( 0.144)( 0.144)

LAG    10           :   -0.060   0.061
( 0.144)( 0.144)
0.191   0.089
( 0.144)( 0.144)

SUMMARY TABLE
-------------

LAGS   1 -  10

***************************
*            *            *
* .-........ * .......+.. *
*            *            *
***************************
*            *            *
* .......... * .......... *
*            *            *
***************************

LI-MCLEOD PORTMANTEAU STATISTIC =     49.234
SIGNIFICANCE LEVEL =      0.086
(BASED ON  37 DEGREES OF FREEDOM)
```