NAG Library Routine Document
G13BDF
1 Purpose
G13BDF calculates preliminary estimates of the parameters of a transfer function model.
2 Specification
SUBROUTINE G13BDF ( |
R0, R, NL, NNA, S, NWDS, WA, IWA, WDS, ISF, IFAIL) |
INTEGER |
NL, NNA(3), NWDS, IWA, ISF(2), IFAIL |
REAL (KIND=nag_wp) |
R0, R(NL), S, WA(IWA), WDS(NWDS) |
|
3 Description
G13BDF 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
G13BCF.
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
G13BAF, 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.
4 References
Box G E P and Jenkins G M (1976) Time Series Analysis: Forecasting and Control (Revised Edition) Holden–Day
5 Parameters
- 1: R0 – REAL (KIND=nag_wp)Input
On entry: the cross-correlation between the two series at lag , .
Constraint:
.
- 2: R(NL) – REAL (KIND=nag_wp) arrayInput
On entry: the cross-correlations between the two series at lags to ,
, for .
Constraint:
, for .
- 3: NL – INTEGERInput
On entry:
, the number of lagged cross-correlations in the array
R.
Constraint:
.
- 4: NNA() – INTEGER arrayInput
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 .
- 5: S – REAL (KIND=nag_wp)Input
On entry: the ratio of the standard deviation of the series to that of the series, .
Constraint:
.
- 6: NWDS – INTEGERInput
On entry: the exact number of parameters in the transfer function model.
Constraint:
.
- 7: WA(IWA) – REAL (KIND=nag_wp) arrayWorkspace
- 8: IWA – INTEGERInput
On entry: the dimension of the array
WA as declared in the (sub)program from which G13BDF is called.
Constraint:
.
- 9: WDS(NWDS) – REAL (KIND=nag_wp) arrayOutput
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 .
- 10: ISF() – INTEGER arrayOutput
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.
- 11: IFAIL – INTEGERInput/Output
-
On entry:
IFAIL must be set to
,
. If you are unfamiliar with this parameter you should refer to
Section 3.3 in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is
.
When the value is used it is essential to test the value of IFAIL on exit.
On exit:
unless the routine detects an error or a warning has been flagged (see
Section 6).
6 Error Indicators and Warnings
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
Errors or warnings detected by the routine:
On entry, | , for , |
or | , |
or | or , |
or | or , for some , |
or | , |
or | , |
or | . |
-
Internal memory allocation failed.
7 Accuracy
Equations used in the computations may become unstable, in which case results are reset to zero with array
ISF values set accordingly.
If ,a local workspace array of fixed length is allocated internally by G13BDF. The total size of this array amounts to integer elements and real elements.
The time taken by G13BDF is roughly proportional to .
9 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.
9.1 Program Text
Program Text (g13bdfe.f90)
9.2 Program Data
Program Data (g13bdfe.d)
9.3 Program Results
Program Results (g13bdfe.r)