【发布时间】:2015-05-19 22:29:29
【问题描述】:
时间序列的 ARMA 预测摘要 (print arma_mod.summary()) 显示了一些有关置信区间的数字。是否可以在显示预测值的图中使用这些数字作为预测区间?
ax = indexed_df.ix[:].plot(figsize=(12,8))
ax = predict_price.plot(ax=ax, style='rx', label='Dynamic Prediction');
ax.legend();
我猜代码:
from statsmodels.sandbox.regression.predstd import wls_prediction_std
prstd, iv_l, iv_u = wls_prediction_std(results)
在这里找到:Confidence intervals for model prediction
...这里不适用于 OLS 而不是 ARMA 预测。我还检查了 github,但没有发现任何可能与时间序列预测有关的新内容。
(我想进行预测需要预测间隔,尤其是在样本外预测时。)
帮助表示赞赏。
【问题讨论】:
标签: python time-series forecasting confidence-interval autoregressive-models