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


public static void g13bd(
	double r0,
	double[] r,
	int nl,
	int[] nna,
	double s,
	int nwds,
	double[] wds,
	int[] isf,
	out int ifail
Visual Basic
Public Shared Sub g13bd ( _
	r0 As Double, _
	r As Double(), _
	nl As Integer, _
	nna As Integer(), _
	s As Double, _
	nwds As Integer, _
	wds As Double(), _
	isf As Integer(), _
	<OutAttribute> ByRef ifail As Integer _
Visual C++
static void g13bd(
	double r0, 
	array<double>^ r, 
	int nl, 
	array<int>^ nna, 
	double s, 
	int nwds, 
	array<double>^ wds, 
	array<int>^ isf, 
	[OutAttribute] int% ifail
static member g13bd : 
        r0 : float * 
        r : float[] * 
        nl : int * 
        nna : int[] * 
        s : float * 
        nwds : int * 
        wds : float[] * 
        isf : int[] * 
        ifail : int byref -> unit 


Type: System..::..Double
On entry: the cross-correlation between the two series at lag 0, rxy0.
Constraint: -1.0r01.0.
Type: array<System..::..Double>[]()[][]
An array of size [nl]
On entry: the cross-correlations between the two series at lags 1 to L, rxyl, for l=1,2,,L.
Constraint: -1.0r[i]1.0, for i=0,1,,nl-1.
Type: System..::..Int32
On entry: L, the number of lagged cross-correlations in the array r.
Constraint: nlmaxnna[0]+nna[1]+nna[2],1.
Type: array<System..::..Int32>[]()[][]
An array of size [3]
On entry: the transfer function model orders in the standard form b,q,p (i.e., delay time, number of moving-average MA-like followed by number of autoregressive AR-like parameters).
Constraint: nna[i-1]0, for i=1,2,3.
Type: System..::..Double
On entry: the ratio of the standard deviation of the y series to that of the x series, sy/sx.
Constraint: s>0.0.
Type: System..::..Int32
On entry: the exact number of parameters in the transfer function model.
Constraint: nwds=nna[1]+nna[2]+1.
Type: array<System..::..Double>[]()[][]
An array of size [nwds]
On exit: the preliminary estimates of the parameters of the transfer function model in the order of q+1 MA-like parameters followed by the p AR-like parameters. If the estimation of either type of parameter fails then these parameters are set to 0.0.
Type: array<System..::..Int32>[]()[][]
An array of size [2]
On exit: indicators of the success of the estimation of MA-like and AR-like parameters respectively. A value 0 indicates that there are no parameters of that type to be estimated. A value of 1 or -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.
Type: System..::..Int32%
On exit: ifail=0 unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).


g13bd calculates estimates of parameters δ1,δ2,,δp, ω0,ω1,,ωq in the transfer function model
given cross-correlations between the series xt and lagged values of yt:
rxyl,  l=0,1,,L
and the ratio of standard deviations sy/sx, as supplied by g13bc.
It is assumed that the series xt 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 bt and at, as defined in the description of g13ba, should be used in place of those between yt and xt.
The estimates are obtained by solving for δ1,δ2,,δp the equations
rxyb+q+j=δ1rxyb+q+j-1++δprxyb+q+j-p,  j=1,2,,p
then calculating
ωi=±sy/sxrxyb+i-δ1rxyb+i-1--δprxyb+i-p,  i=0,1,,q
where the ‘+’ is used for ω0 and ‘-’ for ωi, i>0.
Any value of rxyl arising in these equations for l<b is taken as zero. The parameters δ1,δ2,,δp are checked as to whether they satisfy the stability criterion.


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

Error Indicators and Warnings

Errors or warnings detected by the method:
On entry,nna[i-1]<0, for i=1,2,3,
orr0<-1.0 or r0>1.0,
orr[i-1]<-1.0 or r[i-1]>1.0, for some i=1,2,,nl,
Internal memory allocation failed.
An error occured, see message report.
Negative dimension for array value
Invalid Parameters value


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

Parallelism and Performance


Further Comments

If nna[2]>0,a local workspace array of fixed length is allocated internally by g13bd. The total size of this array amounts to nna[2] integer elements and nna[2]×nna[2]+1 real elements.
The time taken by g13bd is roughly proportional to nwds3.


This example reads the cross-correlations between two series at lags 0 to 6. It then reads a 3,2,1 transfer function model and calculates and prints the preliminary estimates of the parameters of the model.

Example program (C#): g13bde.cs

Example program data: g13bde.d

Example program results: g13bde.r

See Also