全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
411 2
2025-03-07
我的数据是2004年1月到2019年12月的月度时间序列数据,共192个样本点。想用for循环进行1到7步预测,采用expanding的来滚动数据,模型用的是SARIMAX模型。因为进行多步预测,想先将解释变量预测了之后再预测被解释变量,但是我写的代码在预测x的时候出现了问题,AI了很久,还是没搞懂问题出在哪。球球大家帮帮忙呀[em17]
下面是我的代码:
复制代码


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2025-3-9 11:39:46
没有你的数据,无法复现。你也没有提供系统的出错信息
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2025-3-10 10:17:06
cheetahfly 发表于 2025-3-9 11:39
没有你的数据,无法复现。你也没有提供系统的出错信息
之前没有提供系统出错信息主要是因为调整了好久,总有各种不一样的报错信息,我人都要麻了。
下面是数据:
USAdata.xlsx
大小:(74.54 KB)

 马上下载



非常感谢您百忙之中帮忙!


warnings()
警告信息:
1: In forecast.forecast_ARIMA(sarima_model, xreg = xreg_for_forecast,  ... :
  xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.
2: In forecast.forecast_ARIMA(sarima_model, xreg = xreg_for_forecast,  ... :
  xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.
3: In forecast.forecast_ARIMA(sarima_model, xreg = xreg_for_forecast,  ... :
  xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.
4: In forecast.forecast_ARIMA(sarima_model, xreg = xreg_for_forecast,  ... :
  xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.
5: In forecast.forecast_ARIMA(sarima_model, xreg = xreg_for_forecast,  ... :
  xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.
6: In forecast.forecast_ARIMA(sarima_model, xreg = xreg_for_forecast,  ... :
  xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.
7: In forecast.forecast_ARIMA(sarima_model, xreg = xreg_for_forecast,  ... :
  xreg contains different column names from the xreg used in training. Please check that the regressors are in the same order.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群