statsmodels.tsa.forecasting.theta.ThetaModelResults.plot_predict

ThetaModelResults.plot_predict(steps=1, theta=2, alpha=0.05, in_sample=False, fig=None, figsize=None)[source]

Plot forecasts, prediction intervals and in-sample values

Parameters:
stepsint, default 1

The number of steps ahead to compute the forecast components.

thetafloat, default 2

The theta value to use when computing the weight to combine the trend and the SES forecasts.

alpha{float, None}, default 0.05

The tail probability not covered by the confidence interval. Must be in (0, 1). Confidence interval is constructed assuming normally distributed shocks. If None, figure will not show the confidence interval.

in_samplebool, default False

Flag indicating whether to include the in-sample period in the plot.

figFigure, default None

An existing figure handle. If not provided, a new figure is created.

figsize: tuple[float, float], default None

Tuple containing the figure size.

Returns:
Figure

Figure handle containing the plot.

Notes

The variance of the h-step forecast is assumed to follow from the integrated Moving Average structure of the Theta model, and so is \(\sigma^2(\alpha^2 + (h-1))\). The prediction interval assumes that innovations are normally distributed.


Last update: Dec 16, 2024