问题描述
我决定使用 R 和 Power BI 工具来帮助我建立预测模型,而不是反驳我多年的计量经济学笔记。
一方面,我使用了 MAQ Software 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),包括 12 个月的季节性。
我接受任何想法或建议。
先谢谢了。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)