r - Power BI ARIMA 预测自定义视觉与脚本视觉
问题描述
我没有反驳我多年的计量经济学笔记,而是决定使用 R 和 Power BI 工具来帮助我建立预测模型。
我正在使用的数据只是一个量级的每月观察。
一方面,我使用了 MAQ 软件 ARIMA 预测视觉。但是,我还必须获取 p、q、d 参数,这就是为什么我还编写了一个 R 脚本视觉来获取模型(我可以在 RStudio 中看到)和作为网格的预测;BI 网格视觉和 Rstudio 网格打印都给出了相同的结果。
R模型查看
library(gridExtra)
library(quantmod)
library(forecast)
library(openxlsx)
library(tseries)
library(zoo)
Total_Mensual <- read.csv(" ", row.names=NULL) #wherever you download the file
dataset <- aggregate(ï..Total ~ Fecha, data = Total_Mensual, FUN = sum) # for some reason the header becomes all weird, change it if you must. By the way, Fecha is spanish for Date
calendario <- head(dataset, -1) # the data is updated daily, so I try to ignore the current month. I the pbix file, I filter the data so that its only for the last CALENDAR MONTHS
calendario
Values <- ts(calendario$ï..Total, start = c(2017, 5), frequency = 12)
Values # the dataframes are shown right after they are created, so use RStudio to check the consistency
modelo <- auto.arima(Values, seasonal = TRUE)
summary(modelo)
Prediction <- forecast(modelo, h = 12)
Prediction <- data.frame(coredata(Prediction))
grid.table(Prediction)
问题是使用 auto.arima 和预测函数得到的预测与 MAQ 软件视觉接受的预测相差太大,其中我输入了 auto.arima 给出的参数 (1, 0, 0),包括 12月季节性。
我接受任何想法或建议。
预先感谢。
解决方案
推荐阅读
- java - 如何使用 Eclipse 一次在同一个工作区上构建多个 maven 项目?
- javascript - setState 在事件处理程序中不起作用
- javascript - 如果第一个孩子有类,如何设置元素的样式?
- python - Keras 中 VGG16 的输入层
- r - 如何使用分类树在 R-studio 中指定多个拆分?
- c# - .NET:将字符串插入集合中每个项目的开头的方法?
- python - Skimage imread 返回 img_arrayndarray;有什么属性?
- ruby-on-rails - 从 Rails 应用程序每小时运行 rb 文件的选项
- ios - Obj-C - 选择表格视图时数组返回空(有时)?
- r - Rshiny renderRHandsontable如何根据表格一列中的值更新表格