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:
- steps
int,optional The number of steps ahead to compute the forecast components.
- theta
float,optional The theta value to use when computing the weight to combine the trend and the SES forecasts.
- alpha
floatorNone,optional 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,
optional Flag indicating whether to include the in-sample period in the plot.
- fig
Figure,optional An existing figure handle. If not provided, a new figure is created.
- figsize
tupleoffloat,optional Tuple containing the figure size.
- steps
- Returns:
FigureFigure 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(1 + (h-1)(1 + (\alpha-1)^2))\). The prediction interval assumes that innovations are normally distributed.