The function may be called by the names: g13bbc, nag_tsa_multi_filter_transf or nag_tsa_transf_filter.
From a given series a new series is calculated using a supplied (filtering) transfer function model according to the equation
As in the use of g13bac, large transient errors may arise in the early values of due to ignorance of for , and two possibilities are allowed.
(i)The equation (1) is applied from so all terms in on the right-hand side of (1) are known, the unknown set of values for being taken as zero.
(ii)The unknown values of for are estimated by backforecasting exactly as for g13bac.
Box G E P and Jenkins G M (1976) Time Series Analysis: Forecasting and Control (Revised Edition) Holden–Day
1: – const doubleInput
On entry: the backforecasts starting with backforecast at time to backforecast at time followed by the time series starting at time , where . 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: – IntegerInput
On entry: the total number of backforecasts and time series data points in array y.
3: – Nag_TransfOrder *Input
On entry: the orders of the transfer function model where the triplet (transfv.nag_b, transfv.nag_q, transfv.nag_p) corresponds to the triplet as described in Section 2.3.1 in the G13 Chapter Introduction.
4: – Nag_ArimaOrder *Input
On entry: if available, the orders for the filtering ARIMA model for the time series as a pointer to structure of type Nag_ArimaOrder with the following members:
p – Integer
d – IntegerInput
q – IntegerInput
bigp – IntegerInput
bigd – IntegerInput
bigq – IntegerInput
s – IntegerInput
On entry: these seven members of arimas must specify the orders vector , respectively, of the ARIMA model for the output noise component.
, , and refer, respectively, to the number of autoregressive (), moving average (), seasonal autoregressive () and seasonal moving average () parameters.
, and refer, respectively, to the order of non-seasonal differencing, the order of seasonal differencing and the seasonal period.
If no ARIMA model for the series is to be supplied arimas should be set to a NULL pointer.
if , ;
if , .
5: – const doubleInput
On entry: the parameters of the filtering transfer function model followed by the parameters of the ARIMA model for the time series. In the transfer function model the parameters are in the standard order of MA-like followed by AR-like operator parameters. In the ARIMA model the parameters are in the standard order of non-seasonal AR and MA followed by seasonal AR and MA.
6: – IntegerInput
On entry: the total number of parameters held in array par.
if , ;
if , .
7: – doubleInput
On entry: if the ARIMA model is known (i.e., ), cy must specify the constant term of the ARIMA model for the time series. If this model is not known (i.e., ) then cy is not used.
8: – doubleOutput
On exit: the filtered output series. If the ARIMA model for the time series was known, and hence backforecasts were supplied in y, then b contains ‘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 is held in , then the filtered value at time is held in .
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
A supplied model has invalid parameters.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
The matrix used to solve for starting values for MA is singular.
The supplied time series is too short.
Accuracy and stability are high except when the AR-like parameters are close to the invertibility boundary. All calculations are performed in basic precision except for one inner product type calculation which on machines of low precision is performed in additional precision.
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
g13bbc is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
g13bbc makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.
If an ARIMA model is supplied,
local workspace arrays
allocated internally by g13bbc. The total size of
amounts to Integer
elements and double
The time taken by g13bbc is roughly proportional to the product of the length of the series and number of parameters in the filtering model with appreciable increase if an ARIMA model is supplied for the time series.
This example reads a time series of length . It reads one univariate ARIMA model for the series and the filtering transfer function model. initial backforecasts are required and these are calculated by a call to
The backforecasts are inserted at the start of the series and g13bbc is called to perform the filtering.