statsmodels.tsa.statespace.dynamic_factor_mq.DynamicFactorMQResults.apply

DynamicFactorMQResults.apply(endog, k_endog_monthly=None, endog_quarterly=None, refit=False, fit_kwargs=None, copy_initialization=False, retain_standardization=True, **kwargs)[source]

Apply the fitted parameters to new data unrelated to the original data.

Creates a new result object using the current fitted parameters, applied to a completely new dataset that is assumed to be unrelated to the model’s original data. The new results can then be used for analysis or forecasting.

Parameters:
endogarray_like

New observations from the modeled time-series process.

k_endog_monthlyint, optional

If specifying a monthly/quarterly mixed frequency model in which the provided endog dataset contains both the monthly and quarterly data, this variable should be used to indicate how many of the variables are monthly.

endog_quarterlyarray_like, optional

New observations of quarterly variables. If provided, must be a Pandas Series or DataFrame with a DatetimeIndex or PeriodIndex at the quarterly frequency.

refitbool, optional

Whether to re-fit the parameters, using the new dataset. Default is False (so parameters from the current results object are used to create the new results object).

fit_kwargsdict, optional

Keyword arguments to pass to fit (if refit=True) or filter / smooth.

copy_initializationbool, optional

Whether or not to copy the initialization from the current results set to the new model. Default is False.

retain_standardizationbool, optional

Whether or not to use the mean and standard deviations that were used to standardize the data in the current model in the new model. Default is True.

**kwargs

Keyword arguments may be used to modify model specification arguments when created the new model object.

Returns:
results

Updated Results object, that includes results only for the new dataset.

Notes

The endog argument to this method should consist of new observations that are not necessarily related to the original model’s endog dataset. For observations that continue that original dataset by follow directly after its last element, see the append and extend methods.


Last update: Oct 03, 2024