statsmodels.tsa.statespace.dynamic_factor_mq.DynamicFactorMQResults.get_prediction

DynamicFactorMQResults.get_prediction(start=None, end=None, dynamic=False, information_set='predicted', signal_only=False, original_scale=True, index=None, exog=None, extend_model=None, extend_kwargs=None, **kwargs)[source]

In-sample prediction and out-of-sample forecasting.

Parameters:
startint, str, or datetime, optional

Zero-indexed observation number at which to start forecasting, i.e., the first forecast is start. Can also be a date string to parse or a datetime type. Default is the the zeroth observation.

endint, str, or datetime, optional

Zero-indexed observation number at which to end forecasting, i.e., the last forecast is end. Can also be a date string to parse or a datetime type. However, if the dates index does not have a fixed frequency, end must be an integer index if you want out of sample prediction. Default is the last observation in the sample.

dynamicbool, int, str, or datetime, optional

Integer offset relative to start at which to begin dynamic prediction. Can also be an absolute date string to parse or a datetime type (these are not interpreted as offsets). Prior to this observation, true endogenous values will be used for prediction; starting with this observation and continuing through the end of prediction, forecasted endogenous values will be used instead.

information_setstr, optional

The information set to condition each prediction on. Default is “predicted”, which computes predictions of period t values conditional on observed data through period t-1; these are one-step-ahead predictions, and correspond with the typical fittedvalues results attribute. Alternatives are “filtered”, which computes predictions of period t values conditional on observed data through period t, and “smoothed”, which computes predictions of period t values conditional on the entire dataset (including also future observations t+1, t+2, …).

signal_onlybool, optional

Whether to compute forecasts of only the “signal” component of the observation equation. Default is False. For example, the observation equation of a time-invariant model is \(y_t = d + Z \alpha_t + \varepsilon_t\), and the “signal” component is then \(Z \alpha_t\). If this argument is set to True, then forecasts of the “signal” \(Z \alpha_t\) will be returned. Otherwise, the default is for forecasts of \(y_t\) to be returned.

original_scalebool, optional

If the model specification standardized the data, whether or not to return predictions in the original scale of the data (i.e. before it was standardized by the model). Default is True.

**kwargs

Additional arguments may required for forecasting beyond the end of the sample. See FilterResults.predict for more details.

Returns:
forecastndarray

Array of out of in-sample predictions and / or out-of-sample forecasts. An (npredict x k_endog) array.


Last update: Mar 18, 2024