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

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

# NAG Toolbox: nag_tsa_multi_filter_arima (g13ba)

## Purpose

nag_tsa_multi_filter_arima (g13ba) filters a time series by an ARIMA model.

## Syntax

[b, ifail] = g13ba(y, mr, par, cy, nb, 'ny', ny, 'nmr', nmr, 'npar', npar)
[b, ifail] = nag_tsa_multi_filter_arima(y, mr, par, cy, nb, 'ny', ny, 'nmr', nmr, 'npar', npar)

## Description

From a given series y1,y2,,yn${y}_{1},{y}_{2},\dots ,{y}_{n}$, a new series b1,b2,,bn${b}_{1},{b}_{2},\dots ,{b}_{n}$ is calculated using a supplied (filtering) ARIMA model. This model will be one which has previously been fitted to a series xt${x}_{t}$ with residuals at${a}_{t}$. The equations defining bt${b}_{t}$ in terms of yt${y}_{t}$ are very similar to those by which at${a}_{t}$ is obtained from xt${x}_{t}$. The only dissimilarity is that no constant correction is applied after differencing. This is because the series yt${y}_{t}$ is generally distinct from the series xt${x}_{t}$ with which the model is associated, though yt${y}_{t}$ may be related to xt${x}_{t}$. Whilst it is appropriate to apply the ARIMA model to yt${y}_{t}$ so as to preserve the same relationship between bt${b}_{t}$ and at${a}_{t}$ as exists between yt${y}_{t}$ and xt${x}_{t}$, the constant term in the ARIMA model is inappropriate for yt${y}_{t}$. The consequence is that bt${b}_{t}$ will not necessarily have zero mean.
The equations are precisely:
 wt = ∇d∇sDyt, $wt=∇d∇sDyt,$ (1)
the appropriate differencing of yt${y}_{t}$; both the seasonal and non-seasonal inverted autoregressive operations are then applied,
 ut = wt − Φ1wt − s − ⋯ − ΦPwt − s × P $ut=wt-Φ1wt-s-⋯-ΦPwt-s×P$ (2)
 vt = ut − φ1ut − 1 − ⋯ − φput − p $vt=ut-ϕ1ut-1-⋯-ϕput-p$ (3)
followed by the inverted moving average operations
 zt = vt + Θ1zt − s + ⋯ + ΘQzt − s × Q $zt=vt+Θ1zt-s+⋯+ΘQzt-s×Q$ (4)
 bt = zt + θ1bt − 1 + ⋯ + θqbt − q. $bt=zt+θ1bt-1+⋯+θqbt-q.$ (5)
Because the filtered series value bt${b}_{t}$ depends on present and past values yt,yt1,${y}_{t},{y}_{t-1},\dots \text{}$, there is a problem arising from ignorance of y0,y1,${y}_{0},{y}_{-1},\dots \text{}$ which particularly affects calculation of the early values b1,b2,${b}_{1},{b}_{2},\dots \text{}$, causing ‘transient errors’. The function allows two possibilities.
 (i) The equations (1), (2) and (3) are applied from successively later time points so that all terms on their right-hand sides are known, with vt${v}_{t}$ being defined for t = (1 + d + s × D + s × P), … ,n$t=\left(1+d+s×D+s×P\right),\dots ,n$. Equations (4) and (5) are then applied over the same range, taking any values on the right-hand side associated with previous time points to be zero. This procedure may still however result in unacceptably large transient errors in early values of bt${b}_{t}$. (ii) The unknown values y0,y − 1, … ${y}_{0},{y}_{-1},\dots \text{}$ are estimated by backforecasting. This requires that an ARIMA model distinct from that which has been supplied for filtering, should have been previously fitted to yt${y}_{t}$.
For efficiency, you are asked to supply both this ARIMA model for yt${y}_{t}$ and a limited number of backforecasts which are prefixed to the known values of yt${y}_{t}$. Within the function further backforecasts of yt${y}_{t}$, and the series wt${w}_{t}$, ut${u}_{t}$, vt${v}_{t}$ in (1), (2) and (3) are then easily calculated, and a set of linear equations solved for backforecasts of zt,bt${z}_{t},{b}_{t}$ for use in (4) and (5) in the case that q + Q > 0$q+Q>0$.
Even if the best model for yt${y}_{t}$ is not available, a very approximate guess such as
 yt = c + et $yt=c+et$
or
 ∇ yt = et $∇ yt=et$
can help to reduce the transients substantially.
The backforecasts which need to be prefixed to yt${y}_{t}$ are of length Qy = qy + sy × Qy${Q}_{y}^{\prime }={q}_{y}+{s}_{y}×{Q}_{y}$, where qy${q}_{y}$ and Qy${Q}_{y}$ are the non-seasonal and seasonal moving average orders and sy${s}_{y}$ the seasonal period for the ARIMA model of yt${y}_{t}$. Thus you need not carry out the backforecasting exercise if Qy = 0${Q}_{y}^{\prime }=0$. Otherwise, the series y1,y2,,yn${y}_{1},{y}_{2},\dots ,{y}_{n}$ should be reversed to obtain yn,yn1,,y1${y}_{n},{y}_{n-1},\dots ,{y}_{1}$ and nag_tsa_uni_arima_forcecast (g13aj) should be used to forecast Qy${Q}_{y}^{\prime }$ values, 0,,1Qy${\stackrel{^}{y}}_{0},\dots ,{\stackrel{^}{y}}_{1-{Q}_{y}^{\prime }}$. The ARIMA model used is that fitted to yt${y}_{t}$ (as a forward series) except that, if dy + Dy${d}_{y}+{D}_{y}$ is odd, the constant should be changed in sign (to allow, for example, for the fact that a forward upward trend is a reversed downward trend). The ARIMA model for yt${y}_{t}$ supplied to the filtering function must however have the appropriate constant for the forward series.
The series 1Qy,,0,y1,,yn${\stackrel{^}{y}}_{1-{Q}_{y}^{\prime }},\dots ,{\stackrel{^}{y}}_{0},{y}_{1},\dots ,{y}_{n}$ is then supplied to the function, and a corresponding set of values returned for bt${b}_{t}$.

## References

Box G E P and Jenkins G M (1976) Time Series Analysis: Forecasting and Control (Revised Edition) Holden–Day

## Parameters

### Compulsory Input Parameters

1:     y(ny) – double array
ny, the dimension of the array, must satisfy the constraint nymax (1 + Qy,npar)${\mathbf{ny}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1+{Q}_{y}^{\prime },{\mathbf{npar}}\right)$.
The Qy${Q}_{y}^{\prime }$ backforecasts, starting with backforecast at time 1Qy$1-{Q}_{y}^{\prime }$ to backforecast at time 0$0$, followed by the time series starting at time 1$1$, where Qy = mr(10) + mr(13) × mr(14)${Q}_{y}^{\prime }={\mathbf{mr}}\left(10\right)+{\mathbf{mr}}\left(13\right)×{\mathbf{mr}}\left(14\right)$. If there are no backforecasts, either because the ARIMA model for the time series is not known, or because it is known but has no moving average terms, then the time series starts at the beginning of y.
2:     mr(nmr) – int64int32nag_int array
nmr, the dimension of the array, must satisfy the constraint nmr = 7${\mathbf{nmr}}=7$ or 14$14$.
The orders vector for the filtering model, followed by the orders vector for the ARIMA model for the time series if the latter is known. The orders appear in the standard sequence (p,d,q,P,D,Q,s)$\left(p,d,q,P,D,Q,s\right)$ as given in the G13 Chapter Introduction. If the ARIMA model for the time series is supplied, then the function will assume that the first Qy${Q}_{y}^{\prime }$ values of the array y are backforecasts.
Constraints:
the filtering model is restricted in the following ways:
• mr(1) + mr(3) + mr(4) + mr(6) > 0${\mathbf{mr}}\left(1\right)+{\mathbf{mr}}\left(3\right)+{\mathbf{mr}}\left(4\right)+{\mathbf{mr}}\left(6\right)>0$, i.e., filtering by a model which contains only differencing terms is not permitted;
• mr(k)0${\mathbf{mr}}\left(\mathit{k}\right)\ge 0$, for k = 1,2,,7$\mathit{k}=1,2,\dots ,7$;
• if mr(7) = 0${\mathbf{mr}}\left(7\right)=0$, mr(4) + mr(5) + mr(6) = 0${\mathbf{mr}}\left(4\right)+{\mathbf{mr}}\left(5\right)+{\mathbf{mr}}\left(6\right)=0$;
• if mr(7)0${\mathbf{mr}}\left(7\right)\ne 0$, mr(4) + mr(5) + mr(6)0${\mathbf{mr}}\left(4\right)+{\mathbf{mr}}\left(5\right)+{\mathbf{mr}}\left(6\right)\ne 0$;
• mr(7)1${\mathbf{mr}}\left(7\right)\ne 1$.
the ARIMA model for the time series is restricted in the following ways:
• mr(k)0${\mathbf{mr}}\left(\mathit{k}\right)\ge 0$, for k = 8,9,,14$\mathit{k}=8,9,\dots ,14$;
• if mr(14) = 0${\mathbf{mr}}\left(14\right)=0$, mr(11) + mr(12) + mr(13) = 0${\mathbf{mr}}\left(11\right)+{\mathbf{mr}}\left(12\right)+{\mathbf{mr}}\left(13\right)=0$;
• if mr(14)0${\mathbf{mr}}\left(14\right)\ne 0$, mr(11) + mr(12) + mr(13)0${\mathbf{mr}}\left(11\right)+{\mathbf{mr}}\left(12\right)+{\mathbf{mr}}\left(13\right)\ne 0$;
• mr(14)1${\mathbf{mr}}\left(14\right)\ne 1$.
3:     par(npar) – double array
npar, the dimension of the array, must satisfy the constraint
• if nmr = 7${\mathbf{nmr}}=7$, npar = mr(1) + mr(3) + mr(4) + mr(6)${\mathbf{npar}}={\mathbf{mr}}\left(1\right)+{\mathbf{mr}}\left(3\right)+{\mathbf{mr}}\left(4\right)+{\mathbf{mr}}\left(6\right)$;
• if nmr = 14${\mathbf{nmr}}=14$, npar = mr(1) + mr(3) + mr(4) + mr(6) +   mr(8) + mr(10) + mr(11) + mr(13)${\mathbf{npar}}={\mathbf{mr}}\left(1\right)+{\mathbf{mr}}\left(3\right)+{\mathbf{mr}}\left(4\right)+{\mathbf{mr}}\left(6\right)+\phantom{\rule{0ex}{0ex}}{\mathbf{mr}}\left(8\right)+{\mathbf{mr}}\left(10\right)+{\mathbf{mr}}\left(11\right)+{\mathbf{mr}}\left(13\right)$.
Note: the first constraint (i.e., mr(1) + mr(3) + mr(4) + mr(6) > 0${\mathbf{mr}}\left(1\right)+{\mathbf{mr}}\left(3\right)+{\mathbf{mr}}\left(4\right)+{\mathbf{mr}}\left(6\right)>0$) on the orders of the filtering model, in parameter mr, ensures that npar > 0${\mathbf{npar}}>0$.
The parameters of the filtering model, followed by the parameters of the ARIMA model for the time series, if supplied. Within each model the parameters are in the standard order of non-seasonal AR and MA followed by seasonal AR and MA.
4:     cy – double scalar
If the ARIMA model is known (i.e., nmr = 14${\mathbf{nmr}}=14$), cy must specify the constant term of the ARIMA model for the time series. If this model is not known (i.e., nmr = 7${\mathbf{nmr}}=7$), then cy is not used.
5:     nb – int64int32nag_int scalar
The dimension of the array b as declared in the (sub)program from which nag_tsa_multi_filter_arima (g13ba) is called. In addition to holding the returned filtered series, b is also used as an intermediate work array if the ARIMA model for the time series was known.
Constraints:
• if nmr = 14${\mathbf{nmr}}=14$, nbny + max (K3,K1 + K2)${\mathbf{nb}}\ge {\mathbf{ny}}+\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left({K}_{3},{K}_{1}+{K}_{2}\right)$;
• if nmr = 7${\mathbf{nmr}}=7$, nbny${\mathbf{nb}}\ge {\mathbf{ny}}$.
Where
• K1 = mr(1) + mr(4) × mr(7)${K}_{1}={\mathbf{mr}}\left(1\right)+{\mathbf{mr}}\left(4\right)×{\mathbf{mr}}\left(7\right)$;
• K2 = mr(2) + mr(5) × mr(7)${K}_{2}={\mathbf{mr}}\left(2\right)+{\mathbf{mr}}\left(5\right)×{\mathbf{mr}}\left(7\right)$;
• K3 = mr(3) + mr(6) × mr(7)${K}_{3}={\mathbf{mr}}\left(3\right)+{\mathbf{mr}}\left(6\right)×{\mathbf{mr}}\left(7\right)$.

### Optional Input Parameters

1:     ny – int64int32nag_int scalar
Default: The dimension of the array y.
The total number of backforecasts and time series data points in array y.
Constraint: nymax (1 + Qy,npar)${\mathbf{ny}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1+{Q}_{y}^{\prime },{\mathbf{npar}}\right)$.
2:     nmr – int64int32nag_int scalar
Default: The dimension of the array mr.
The number of values specified in the array mr. It takes the value 7$7$ if no ARIMA model for the time series is supplied but otherwise it takes the value 14$14$. Thus nmr acts as an indicator as to whether backforecasting can be carried out.
Constraint: nmr = 7${\mathbf{nmr}}=7$ or 14$14$.
3:     npar – int64int32nag_int scalar
Default: The dimension of the array par.
The total number of parameters held in array par.
Constraints:
• if nmr = 7${\mathbf{nmr}}=7$, npar = mr(1) + mr(3) + mr(4) + mr(6)${\mathbf{npar}}={\mathbf{mr}}\left(1\right)+{\mathbf{mr}}\left(3\right)+{\mathbf{mr}}\left(4\right)+{\mathbf{mr}}\left(6\right)$;
• if nmr = 14${\mathbf{nmr}}=14$, npar = mr(1) + mr(3) + mr(4) + mr(6) +   mr(8) + mr(10) + mr(11) + mr(13)${\mathbf{npar}}={\mathbf{mr}}\left(1\right)+{\mathbf{mr}}\left(3\right)+{\mathbf{mr}}\left(4\right)+{\mathbf{mr}}\left(6\right)+\phantom{\rule{0ex}{0ex}}{\mathbf{mr}}\left(8\right)+{\mathbf{mr}}\left(10\right)+{\mathbf{mr}}\left(11\right)+{\mathbf{mr}}\left(13\right)$.
Note: the first constraint (i.e., mr(1) + mr(3) + mr(4) + mr(6) > 0${\mathbf{mr}}\left(1\right)+{\mathbf{mr}}\left(3\right)+{\mathbf{mr}}\left(4\right)+{\mathbf{mr}}\left(6\right)>0$) on the orders of the filtering model, in parameter mr, ensures that npar > 0${\mathbf{npar}}>0$.

wa nwa

### Output Parameters

1:     b(nb) – double array
The filtered output series. If the ARIMA model for the time series was known, and hence Qy${Q}_{y}^{\prime }$ backforecasts were supplied in y, then b contains Qy${Q}_{y}^{\prime }$ ‘filtered’ backforecasts followed by the filtered series. Otherwise, the filtered series begins at the start of b just as the original series began at the start of y. In either case, if the value of the series at time t$t$ is held in y(t)${\mathbf{y}}\left(t\right)$, then the filtered value at time t$t$ is held in b(t)${\mathbf{b}}\left(t\right)$.
2:     ifail – int64int32nag_int scalar
${\mathrm{ifail}}={\mathbf{0}}$ unless the function detects an error (see [Error Indicators and Warnings]).

## Error Indicators and Warnings

Errors or warnings detected by the function:
ifail = 1${\mathbf{ifail}}=1$
 On entry, nmr ≠ 7${\mathbf{nmr}}\ne 7$ and nmr ≠ 14${\mathbf{nmr}}\ne 14$.
ifail = 2${\mathbf{ifail}}=2$
 On entry, the orders vector mr does not satisfy the constraints given in Section [Parameters].
ifail = 3${\mathbf{ifail}}=3$
 On entry, npar is inconsistent with the contents of mr (see Section [Parameters]).
ifail = 4${\mathbf{ifail}}=4$
 On entry, ny is too small to successfully carry out the requested filtering, (see Section [Parameters]).
ifail = 5${\mathbf{ifail}}=5$
 On entry, the work array wa is too small.
ifail = 6${\mathbf{ifail}}=6$
 On entry, the array b is too small.
ifail = 7${\mathbf{ifail}}=7$
The orders vector for the filtering model is invalid.
ifail = 8${\mathbf{ifail}}=8$
The orders vector for the ARIMA model is invalid. (Only occurs if nmr = 14${\mathbf{nmr}}=14$.)
ifail = 9${\mathbf{ifail}}=9$
The initial values of the filtered series are indeterminate for the given models.
ifail = 999${\mathbf{ifail}}=-999$
Internal memory allocation failed.

## Accuracy

Accuracy and stability are high except when the MA parameters are close to the invertibility boundary.

## Further Comments

If an ARIMA model is supplied, a local workspace array of fixed length is allocated internally by nag_tsa_multi_filter_arima (g13ba). The total size of this array amounts to K$K$ integer elements, where K$K$ is the expression defined in the description of the parameter wa.
The time taken by nag_tsa_multi_filter_arima (g13ba) is approximately proportional to
 ny × (mr(1) + mr(3) + mr(4) + mr(6)), $ny×(mr1+mr3+mr4+mr6),$
with an appreciable fixed increase if an ARIMA model is supplied for the time series.

## Example

```function nag_tsa_multi_filter_arima_example
y = [49.98070870808541;
52.67136711304528;
53.8;
53.6;
53.5;
53.5;
53.4;
53.1;
52.7;
52.4;
52.2;
52;
52;
52.4;
53;
54;
54.9;
56;
56.8;
56.8;
56.4;
55.7;
55;
54.3;
53.2;
52.3;
51.6;
51.2;
50.8;
50.5;
50;
49.2;
48.4;
47.9;
47.6;
47.5;
47.5;
47.6;
48.1;
49;
50;
51.1;
51.8;
51.9;
51.7;
51.2;
50;
48.3;
47;
45.8;
45.6;
46;
46.9;
47.8;
48.2;
48.3;
47.9;
47.2;
47.2;
48.1;
49.4;
50.6;
51.5;
51.6;
51.2;
50.5;
50.1;
49.8;
49.6;
49.4;
49.3;
49.2;
49.3;
49.7;
50.3;
51.3;
52.8;
54.4;
56;
56.9;
57.5;
57.3;
56.6;
56;
55.4;
55.4;
56.4;
57.2;
58;
58.4;
58.4;
58.1;
57.7;
57;
56;
54.7;
53.2;
52.1;
51.6;
51;
50.5;
50.4;
51;
51.8;
52.4;
53;
53.4;
53.6;
53.7;
53.8;
53.8;
53.8;
53.3;
53;
52.9;
53.4;
54.6;
56.4;
58;
59.4;
60.2;
60;
59.4;
58.4;
57.6;
56.9;
56.4;
56;
55.7;
55.3;
55;
54.4;
53.7;
52.8;
51.6;
50.6;
49.4;
48.8;
48.5;
48.7;
49.2;
49.8;
50.4;
50.7;
50.9;
50.7;
50.5;
50.4;
50.2;
50.4;
51.2;
52.3;
53.2;
53.9;
54.1;
54;
53.6;
53.2;
53;
52.8;
52.3;
51.9;
51.6;
51.6;
51.4;
51.2;
50.7;
50;
49.4;
49.3;
49.7;
50.6;
51.8;
53;
54;
55.3;
55.9;
55.9;
54.6;
53.5;
52.4;
52.1;
52.3;
53;
53.8;
54.6;
55.4;
55.9;
55.9;
55.2;
54.4;
53.7;
53.6;
53.6;
53.2;
52.5;
52;
51.4;
51;
50.9;
52.4;
53.5;
55.6;
58;
59.5;
60;
60.4;
60.5;
60.2;
59.7;
59;
57.6;
56.4;
55.2;
54.5;
54.1;
54.1;
54.4;
55.5;
56.2;
57;
57.3;
57.4;
57;
56.4;
55.9;
55.5;
55.3;
55.2;
55.4;
56;
56.5;
57.1;
57.3;
56.8;
55.6;
55;
54.1;
54.3;
55.3;
56.4;
57.2;
57.8;
58.3;
58.6;
58.8;
58.8;
58.6;
58;
57.4;
57;
56.4;
56.3;
56.4;
56.4;
56;
55.2;
54;
53;
52;
51.6;
51.6;
51.1;
50.4;
50;
50;
52;
54;
55.1;
54.5;
52.8;
51.4;
50.8;
51.2;
52;
52.8;
53.8;
54.5;
54.9;
54.9;
54.8;
54.4;
53.7;
53.3;
52.8;
52.6;
52.6;
53;
54.3;
56;
57;
58;
58.6;
58.5;
58.3;
57.8;
57.3;
57];
mr = [int64(3);0;0;0;0;0;0;4;0;2;0;0;0;0];
par = [1.97;
-1.37;
0.34;
2.42;
-2.38;
1.16;
-0.23;
0.31;
-0.47];
cy = 0;
nb = int64(301);
[b, ifail] = nag_tsa_multi_filter_arima(y, mr, par, cy, nb);
ifail
```
```

ifail =

0

```
```function g13ba_example
y = [49.98070870808541;
52.67136711304528;
53.8;
53.6;
53.5;
53.5;
53.4;
53.1;
52.7;
52.4;
52.2;
52;
52;
52.4;
53;
54;
54.9;
56;
56.8;
56.8;
56.4;
55.7;
55;
54.3;
53.2;
52.3;
51.6;
51.2;
50.8;
50.5;
50;
49.2;
48.4;
47.9;
47.6;
47.5;
47.5;
47.6;
48.1;
49;
50;
51.1;
51.8;
51.9;
51.7;
51.2;
50;
48.3;
47;
45.8;
45.6;
46;
46.9;
47.8;
48.2;
48.3;
47.9;
47.2;
47.2;
48.1;
49.4;
50.6;
51.5;
51.6;
51.2;
50.5;
50.1;
49.8;
49.6;
49.4;
49.3;
49.2;
49.3;
49.7;
50.3;
51.3;
52.8;
54.4;
56;
56.9;
57.5;
57.3;
56.6;
56;
55.4;
55.4;
56.4;
57.2;
58;
58.4;
58.4;
58.1;
57.7;
57;
56;
54.7;
53.2;
52.1;
51.6;
51;
50.5;
50.4;
51;
51.8;
52.4;
53;
53.4;
53.6;
53.7;
53.8;
53.8;
53.8;
53.3;
53;
52.9;
53.4;
54.6;
56.4;
58;
59.4;
60.2;
60;
59.4;
58.4;
57.6;
56.9;
56.4;
56;
55.7;
55.3;
55;
54.4;
53.7;
52.8;
51.6;
50.6;
49.4;
48.8;
48.5;
48.7;
49.2;
49.8;
50.4;
50.7;
50.9;
50.7;
50.5;
50.4;
50.2;
50.4;
51.2;
52.3;
53.2;
53.9;
54.1;
54;
53.6;
53.2;
53;
52.8;
52.3;
51.9;
51.6;
51.6;
51.4;
51.2;
50.7;
50;
49.4;
49.3;
49.7;
50.6;
51.8;
53;
54;
55.3;
55.9;
55.9;
54.6;
53.5;
52.4;
52.1;
52.3;
53;
53.8;
54.6;
55.4;
55.9;
55.9;
55.2;
54.4;
53.7;
53.6;
53.6;
53.2;
52.5;
52;
51.4;
51;
50.9;
52.4;
53.5;
55.6;
58;
59.5;
60;
60.4;
60.5;
60.2;
59.7;
59;
57.6;
56.4;
55.2;
54.5;
54.1;
54.1;
54.4;
55.5;
56.2;
57;
57.3;
57.4;
57;
56.4;
55.9;
55.5;
55.3;
55.2;
55.4;
56;
56.5;
57.1;
57.3;
56.8;
55.6;
55;
54.1;
54.3;
55.3;
56.4;
57.2;
57.8;
58.3;
58.6;
58.8;
58.8;
58.6;
58;
57.4;
57;
56.4;
56.3;
56.4;
56.4;
56;
55.2;
54;
53;
52;
51.6;
51.6;
51.1;
50.4;
50;
50;
52;
54;
55.1;
54.5;
52.8;
51.4;
50.8;
51.2;
52;
52.8;
53.8;
54.5;
54.9;
54.9;
54.8;
54.4;
53.7;
53.3;
52.8;
52.6;
52.6;
53;
54.3;
56;
57;
58;
58.6;
58.5;
58.3;
57.8;
57.3;
57];
mr = [int64(3);0;0;0;0;0;0;4;0;2;0;0;0;0];
par = [1.97;
-1.37;
0.34;
2.42;
-2.38;
1.16;
-0.23;
0.31;
-0.47];
cy = 0;
nb = int64(301);
[b, ifail] = g13ba(y, mr, par, cy, nb);
ifail
```
```

ifail =

0

```

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2013