g13bd calculates preliminary estimates of the parameters of a transfer function model.
Syntax
C# |
---|
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++ |
---|
public: 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 ) |
F# |
---|
static member g13bd : r0 : float * r : float[] * nl : int * nna : int[] * s : float * nwds : int * wds : float[] * isf : int[] * ifail : int byref -> unit |
Parameters
- r0
- Type: System..::..DoubleOn entry: the cross-correlation between the two series at lag , .Constraint: .
- r
- Type: array<System..::..Double>[]()[][]An array of size [nl]On entry: the cross-correlations between the two series at lags to , , for .Constraint: , for .
- nl
- Type: System..::..Int32On entry: , the number of lagged cross-correlations in the array r.Constraint: .
- nna
- Type: array<System..::..Int32>[]()[][]An array of size []On entry: the transfer function model orders in the standard form (i.e., delay time, number of moving-average MA-like followed by number of autoregressive AR-like parameters).Constraint: , for .
- s
- Type: System..::..DoubleOn entry: the ratio of the standard deviation of the series to that of the series, .Constraint: .
- nwds
- Type: System..::..Int32On entry: the exact number of parameters in the transfer function model.Constraint: .
- wds
- 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 MA-like parameters followed by the AR-like parameters. If the estimation of either type of parameter fails then these parameters are set to .
- isf
- Type: array<System..::..Int32>[]()[][]An array of size []On exit: indicators of the success of the estimation of MA-like and AR-like parameters respectively. A value indicates that there are no parameters of that type to be estimated. A value of or 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.
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
g13bd calculates estimates of parameters , in the transfer function model
given cross-correlations between the series and lagged values of :
and the ratio of standard deviations , as supplied by g13bc.
It is assumed that the series 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 and , as defined in the description of g13ba, should be used in place of those between and .
The estimates are obtained by solving for the equations
then calculating
where the ‘’ is used for and ‘’ for , .
Any value of arising in these equations for is taken as zero. The parameters 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
Error Indicators and Warnings
Errors or warnings detected by the method:
On entry, , for , or , or or , or or , for some , or , or , or .
- 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.
Parallelism and Performance
None.
Further Comments
If ,a local workspace array of fixed length is allocated internally by g13bd. The total size of this array amounts to integer elements and real elements.
The time taken by g13bd is roughly proportional to .
Example
This example reads the cross-correlations between two series at lags to . It then reads a transfer function model and calculates and prints the preliminary estimates of the parameters of the model.
Example program (C#): g13bde.cs