# naginterfaces.library.tsa.multi_​inputmod_​update¶

naginterfaces.library.tsa.multi_inputmod_update(sttf, mr, mt, para, xxyn, kzef)[source]

multi_inputmod_update accepts a series of new observations of an output time series and any associated input time series, for which a multi-input model is already fully specified, and updates the ‘state set’ information for use in constructing further forecasts.

The previous specification of the multi-input model will normally have been obtained by using multi_inputmod_estim() to estimate the relevant transfer function and ARIMA parameters. The supplied state set will originally have been produced by multi_inputmod_estim() (or possibly multi_inputmod_forecast()), but may since have been updated by multi_inputmod_update.

For full information please refer to the NAG Library document for g13bg

https://www.nag.com/numeric/nl/nagdoc_27.1/flhtml/g13/g13bgf.html

Parameters
sttffloat, array-like, shape

The values in the state set before updating as returned by multi_inputmod_estim() or multi_inputmod_forecast(), or a previous call to multi_inputmod_update.

mrint, array-like, shape

The orders vector 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.

mtint, array-like, shape

The transfer function model orders , and of each of the input series. The data for input series are held in column . Row 1 holds the value , row 2 holds the value and row 3 holds the value . For a simple input, .

Row 4 holds the value , where for a simple input and or for a transfer function input.

When any nonzero contents of rows 1, 2 and 3 of column are ignored.

The choice of or is an option for use in model estimation and does not affect the operation of multi_inputmod_update.

parafloat, array-like, shape

Estimates of the multi-input model parameters as returned by multi_inputmod_estim(). These are in order, firstly the ARIMA model parameters: values of parameters, values of parameters, values of parameters and values of parameters. These are followed by the transfer function model parameter values , for the first of any input series and similarly for each subsequent input series. The final component of is the value of the constant .

xxynfloat, array-like, shape

The new observation sets being used to update the state set. Column contains the values of input series , for . Column contains the values of the output series. Consecutive rows correspond to increasing time sequence.

kzefint

Must not be set to , if the values of the input component series and the values of the output noise component are to overwrite the contents of on exit, and must be set to if is to remain unchanged on exit.

Returns
sttffloat, ndarray, shape

The state set values after updating.

xxynfloat, ndarray, shape

If , remains unchanged.

If , the columns of hold the corresponding values of the input component series and the output noise component in that order.

resfloat, ndarray, shape

The values of the residual series corresponding to the new observations of the output series.

Raises
NagValueError
(errno )

On entry, .

Constraint: , and must be consistent.

(errno )

On entry, .

Constraint: , and must be consistent.

(errno )

On entry, the orders vector is invalid.

(errno )

On entry, and .

Constraint: , or .

Notes

The multi-input model is specified in Notes for multi_inputmod_estim. The form of these equations required to update the state set is as follows:

the transfer models which generate input component values from one or more inputs ,

which generates the output noise component from the output and the input components, and

the ARIMA model for the output noise which generates the residuals .

The state set (as also given in Notes for multi_inputmod_estim) is the collection of terms

for up to the maximum lag associated with each of these series respectively, in the above model equations. is the latest time point of the series from which the state set has been generated.

The function accepts further values of the series , , for , and applies the above model equations over this time range, to generate new values of the various model components, noise series and residuals. The state set is reconstructed, corresponding to the latest time point , the earlier values being discarded.

The set of residuals corresponding to the new observations may be of use in checking that the new observations conform to the previously fitted model. The components of the new observations of the output series which are due to the various inputs, and the noise component, are also optionally returned.

The parameters of the model are not changed in this function.

References

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