对于时间序列的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();
I guess the code:
from statsmodels.sandbox.regression.predstd import wls_prediction_std
prstd, iv_l, iv_u = wls_prediction_std(results)
在这里找到:模型预测的置信区间
...不适用于ARMA预测,因为它是针对OLS而非ARMA预测制定的。我也检查了Github,但没有找到任何与时间序列预测相关的新资料。
(进行预测需要预测区间,尤其是在进行样本外预测时。)
希望能得到帮助。
import statsmodels.api as sm
instead ofimport statsmodels as sm
- Michael D