On entry: the dimension of the array
WA as declared in the (sub)program from which G13BJF is called.
It is not practical to outline a method for deriving the exact minimum permissible value of
IWA, but the following gives a reasonably good approximation which tends to be on the conservative side.
Note: there are three error indicators associated with
IWA. These are
${\mathbf{IFAIL}}={\mathbf{4}}$,
${\mathbf{5}}$ or
${\mathbf{6}}$. The first of these probably indicates an abnormal entry value of
NFV, while the second indicates that
IWA is much too small and needs to be increased by a substantial amount. The last of these indicates that
IWA is too small but returns the necessary minimum value in
${\mathbf{MWA}}\left(1\right)$.
Let ${q}^{\prime}=q+\left(Q\times s\right)$ and ${d}^{\prime}=d+\left(D\times s\right)$, where the output noise ARIMA model orders are $p$, $d$, $q$, $P$, $D$, $Q$, $s$.
Let there be
$l$ input series, where
$l={\mathbf{NSER}}-1$.
Let | $m{x}_{i}=\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left({b}_{i}+{q}_{i},{p}_{i}\right)$, | if
${r}_{\mathit{i}}=3$, for $\mathit{i}=1,2,\dots ,l$, if $l>0$ |
| $m{x}_{i}=0$, | if
${r}_{\mathit{i}}\ne 3$, for $\mathit{i}=1,2,\dots ,l$, if $l>0$ |
where the transfer function model orders of input series
$i$ are given by
${b}_{i}$,
${q}_{i}$,
${p}_{i}$,
${r}_{i}$.
Let $qx=\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left({q}^{\prime},m{x}_{1},m{x}_{2},\dots ,m{x}_{l}\right)$
Let $\mathit{ncg}={\mathbf{NPARA}}+qx+{\displaystyle \sum _{i=1}^{l}}m{x}_{i}$ and $\mathit{nch}=N+d+6\times qx$.
Finally, let $\mathit{nci}={\mathbf{NSER}}$, and then increment $\mathit{nci}$ by $1$ every time any of the following conditions are satisfied. (The last two conditions should be applied separately to each input series, so that for example if we have two input series and ${p}_{1}>0$ and ${p}_{2}>0$, then $\mathit{nci}$ is incremented by $2$ in respect of these.)
The conditions are:
- $p>0$
- $q>0$
- $P>0$
- $Q>0$
- $qx>0$
- $m{x}_{\mathit{i}}>0$, separately, for $\mathit{i}=1,2,\dots ,l$, if $l>0$
- ${p}_{\mathit{i}}>0$, separately, for $\mathit{i}=1,2,\dots ,l$, if $l>0$,
then ${\mathbf{IWA}}>2\times {\left(\mathit{ncg}\right)}^{2}+\mathit{nch}\times \left(\mathit{nci}+4\right)$.