hide long namesshow long names
hide short namesshow short names
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_transf_prelim (g13bd)

Purpose

nag_tsa_multi_transf_prelim (g13bd) calculates preliminary estimates of the parameters of a transfer function model.

Syntax

[wds, isf, ifail] = g13bd(r0, r, nna, s, 'nl', nl)
[wds, isf, ifail] = nag_tsa_multi_transf_prelim(r0, r, nna, s, 'nl', nl)

Description

nag_tsa_multi_transf_prelim (g13bd) calculates estimates of parameters δ1,δ2,,δpδ1,δ2,,δp, ω0,ω1,,ωqω0,ω1,,ωq in the transfer function model
yt = δ1yt1 + δ2yt2 + + δpytp + ω0xtbω1xtb1ωqxtbq
yt=δ1yt-1+δ2yt-2++δpyt-p+ω0xt-b-ω1xt-b-1--ωqxt-b-q
given cross-correlations between the series xtxt and lagged values of ytyt:
rxy(l),  l = 0,1,,L
rxy(l),  l=0,1,,L
and the ratio of standard deviations sy / sxsy/sx, as supplied by nag_tsa_multi_xcorr (g13bc).
It is assumed that the series xtxt used to calculate the cross-correlations is a sample from a time series with true autocorrelations of zero. Otherwise the cross-correlations between the series btbt and atat, as defined in the description of nag_tsa_multi_filter_arima (g13ba), should be used in place of those between ytyt and xtxt.
The estimates are obtained by solving for δ1,δ2,,δpδ1,δ2,,δp the equations
rxy(b + q + j) = δ1rxy(b + q + j1) + + δprxy(b + q + jp),  j = 1,2,,p
rxy(b+q+j)=δ1rxy(b+q+j-1)++δprxy(b+q+j-p),  j=1,2,,p
then calculating
ωi = ± (sy / sx) [rxy(b + i)δ1rxy(b + i1)δprxy(b + ip)] ,   i = 0,1,,q
ωi = ± ( sy / sx ) [ rxy (b+i) - δ1 rxy (b+i- 1) - - δp rxy (b+i-p) ] ,   i= 0,1,,q
where the ‘ + +’ is used for ω0ω0 and ‘-’ for ωiωi, i > 0i>0.
Any value of rxy(l)rxy(l) arising in these equations for l < bl<b is taken as zero. The parameters δ1,δ2,,δpδ1,δ2,,δp are checked as to whether they satisfy the stability criterion.

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:     r0 – double scalar
The cross-correlation between the two series at lag 00, rxy(0)rxy(0).
Constraint: 1.0r01.0-1.0r01.0.
2:     r(nl) – double array
nl, the dimension of the array, must satisfy the constraint nlmax (nna(1) + nna(2) + nna(3),1)nlmax(nna1+nna2+nna3,1).
The cross-correlations between the two series at lags 11 to LL, rxy(l)rxy(l), for l = 1,2,,Ll=1,2,,L.
Constraint: 1.0r(i)1.0-1.0ri1.0, for i = 1,2,,nli=1,2,,nl.
3:     nna(33) – int64int32nag_int array
The transfer function model orders in the standard form b,q,pb,q,p (i.e., delay time, number of moving-average MA-like followed by number of autoregressive AR-like parameters).
Constraint: nna(i)0nnai0, for i = 1,2,3i=1,2,3.
4:     s – double scalar
The ratio of the standard deviation of the yy series to that of the xx series, sy / sxsy/sx.
Constraint: s > 0.0s>0.0.

Optional Input Parameters

1:     nl – int64int32nag_int scalar
Default: The dimension of the array r.
LL, the number of lagged cross-correlations in the array r.
Constraint: nlmax (nna(1) + nna(2) + nna(3),1)nlmax(nna1+nna2+nna3,1).

Input Parameters Omitted from the MATLAB Interface

nwds wa iwa

Output Parameters

1:     wds(nwds) – double array
nwds = nna(2) + nna(3) + 1nwds=nna2+nna3+1.
The preliminary estimates of the parameters of the transfer function model in the order of q + 1q+1 MA-like parameters followed by the pp AR-like parameters. If the estimation of either type of parameter fails then these parameters are set to 0.00.0.
2:     isf(22) – int64int32nag_int array
Indicators of the success of the estimation of MA-like and AR-like parameters respectively. A value 00 indicates that there are no parameters of that type to be estimated. A value of 11 or 1-1 indicates that there are parameters of that type in the model and the estimation of that type has been successful or unsuccessful respectively. Note that there is always at least one MA-like parameter in the model.
3:     ifail – int64int32nag_int scalar
ifail = 0ifail=0 unless the function detects an error (see [Error Indicators and Warnings]).

Error Indicators and Warnings

Errors or warnings detected by the function:
  ifail = 1ifail=1
On entry,nna(i) < 0nnai<0, for i = 1,2,3i=1,2,3,
ornl < max (nna(1) + nna(2) + nna(3),1)nl<max(nna1+nna2+nna3,1),
orr0 < 1.0r0<-1.0 or r0 > 1.0r0>1.0,
orr(i) < 1.0ri<-1.0 or r(i) > 1.0ri>1.0, for some i = 1,2,,nli=1,2,,nl,
ors0.0s0.0,
ornwdsnna(2) + nna(3) + 1nwdsnna2+nna3+1,
oriwa < nna(3) × (nna(3) + 1)iwa<nna3×(nna3+1).
  ifail = 999ifail=-999
Internal memory allocation failed.

Accuracy

Equations used in the computations may become unstable, in which case results are reset to zero with array isf values set accordingly.

Further Comments

If nna(3) > 0nna3>0,a local workspace array of fixed length is allocated internally by nag_tsa_multi_transf_prelim (g13bd). The total size of this array amounts to nna(3)nna3 integer elements and nna(3) × (nna(3) + 1)nna3×(nna3+1) double elements.
The time taken by nag_tsa_multi_transf_prelim (g13bd) is roughly proportional to nwds3nwds3.

Example

function nag_tsa_multi_transf_prelim_example
r0 = -0.0155;
r = [0.0339;
     -0.0374;
     -0.2895;
     -0.343;
     -0.4518;
     -0.2787];
nna = [int64(3);2;1];
s = 1.9256;
[wds, isf, ifail] = nag_tsa_multi_transf_prelim(r0, r, nna, s)
 

wds =

   -0.5575
    0.3166
    0.4626
    0.6169


isf =

                    1
                    1


ifail =

                    0


function g13bd_example
r0 = -0.0155;
r = [0.0339;
     -0.0374;
     -0.2895;
     -0.343;
     -0.4518;
     -0.2787];
nna = [int64(3);2;1];
s = 1.9256;
[wds, isf, ifail] = g13bd(r0, r, nna, s)
 

wds =

   -0.5575
    0.3166
    0.4626
    0.6169


isf =

                    1
                    1


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