- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想在同一个地 block 上用不同颜色绘制多个预测,但是,比例尺不对。我对任何其他方法持开放态度。
可重现的例子:
require(forecast)
# MAKING DATA
data <- c(3.86000, 19.55810, 19.51091, 20.74048, 20.71333, 29.04191, 30.28864, 25.64300, 23.33368, 23.70870 , 26.16600 ,27.61286 , 27.88409 , 28.41400 , 24.81957 , 24.60952, 27.49857, 32.08000 , 29.98000, 27.49000 , 237.26150, 266.35478, 338.30000, 377.69476, 528.65905, 780.00000 )
a.ts <- ts(data,start=c(2005,1),frequency=12)
# FORECASTS
arima011_css =stats::arima(x = a.ts, order = c(0, 1, 1), method = "CSS") # css estimate
arima011_forecast = forecast(arima011_css, h=10, level=c(99.5))
arima321_css =stats::arima(x = a.ts, order = c(3, 2, 1), method = "CSS") # css estimate
arima321_forecast = forecast(arima321_css, h=10, level=c(99.5))
# MY ATTEMPT AT PLOTS
plot(arima321_forecast)
par(new=T)
plot(arima011_forecast)
最佳答案
这是类似于@jay.sf 但使用 ggplot2 的东西。
library(ggplot2)
autoplot(a.ts) +
autolayer(arima011_forecast, series = "ARIMA(0,1,1)", alpha = 0.5) +
autolayer(arima321_forecast, series = "ARIMA(3,2,1)", alpha = 0.5) +
guides(colour = guide_legend("Model"))
由 reprex package 创建于 2020-05-19 (v0.3.0)
关于R:如何在同一时间序列上绘制多个 ARIMA 预测,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61887022/
我想获取完整数据模型的参数,然后使用这些参数针对数据的“样本内”运行模型,但我不知道该怎么做。 例如; data<-c(79160.56266,91759.73029,91186.47551,1063
在线文档表明引擎盖下的算法与估计 (s)Arima 模型相同。在一些测试中,使用 Kaggle 数据集,我有不同的模型:ARIMA 函数显示了一个 sArima,auto.arima 只有 Arima
我正在从事预测商店销售的项目以学习预测。到目前为止,我已经成功地使用了简单的 auto.Arima() 函数进行预测。但是为了使这些预测更准确,我可以使用协变量。我已经定义了协变量,例如假期,在这篇文
大多数时候运行 arima.sim() 函数来模拟 arima mosel 的特定顺序,但是当通过 auto 检查此类模拟时间序列数据时。 arima() 函数,它通常不会与 arima.sim()
我曾尝试在 python 中同时在 R 上使用 auto arima 获取相同的数据,但得到了不同的 ARIMA 模型选择是具有不同 AIC 的最佳模型。你能告诉我为什么我从两种语言中得到具有不同 A
我正在尝试使用 ARIMA sim 包来模拟具有漂移的 ARIMA 模拟。我的问题是我似乎无法让它工作。 我需要得到这样的东西: enter image description here 我的代码正在
我正在尝试手动计算 ARIMA 模型中常量的标准误差(如果包含)。我引用了 Box 和 Jenkins (1994) 的文本,特别是第 7.2 节,但我的理解是这里提到的方法仅计算 ARIMA 参数的
您好,我想知道是否可以仅提取 ARIMA 模型的值?每当我只查找它创建的一组值时,我都无法在它创建的列表中找到它们。我看到残差、系数等,但值在哪里。我知道我可能会误解 ARIMA 在 R 中所做的事情
我有一些 forecast::Arima 语法问题。如果我知道季节性 ARIMA 在统计上是正确的,因为它是 auto.arima 的结果,我如何修复以下 Arima 函数使其具有与 auto.ari
我有一个时间序列预测问题,我正在使用 statsmodels python 包来解决。使用 AIC 标准进行评估,结果证明最优模型相当复杂,类似于 ARIMA(27,1,8) [我没有对参数空间进行详
如何反转平稳性并将日期重新应用于数据以进行绘图? 源代码: https://nbviewer.jupyter.org/github/robbiemu/location-metric-data/blob
我试图在包含外生变量的 python statsmodels ARIMA 包中预测时间序列,但无法找出在预测步骤中插入外生变量的正确方法。参见 here对于文档。 import numpy as np
我正在尝试编写代码来生成一系列 arima 模型并比较不同的模型。代码如下。 p=0 q=0 d=0 pdq=[] aic=[] for p in range(6): for d in ran
我正在尝试使用 fable 包为 1000 家商店创建预测。 fable 包是否像 forecast 函数一样并行工作? 非常感谢 最佳答案 您可以使用来自 future 包的 plan() 并行模型
我正在尝试拟合 ARIMA 模型。我有 3 个月的数据,它每分钟显示 count(float)。我应该为 arima.fit() 传递哪个顺序?我需要预测每一分钟。 最佳答案 基本的 ARIMA(p,
假设我有一些如下的时间序列,我想预测 c1一步一个头,在 R 中这样做非常简单和容易: testurl = "https://docs.google.com/spreadsheets/d/1jtpQa
我正在生成带有外部回归器的 Arima 模型。假设我有 观察。 predict.Arima函数来自 forecast包只是对 进行预测n + 1 观察。 我需要对 进行预测值(系列的最后一个值),改变
我有一个计数时间序列数据,我可以用它来确定基础随机过程的参数。例如说我有一个 SARIMA (p,d,q)(P,D,Q)[S] 季节性 ARIMA 模型。 如何使用它来生成新的计数时间序列数据集? 更
我创建了一个带有有效 DatetimeIndex 的 Pandas DataFrame df.index = df.timestamp df = df.resample("10Min", how="m
我正在尝试通过以下命令使用 R 中的预测包从季节性 arima 模型生成模拟: simulate(model_temp) 哪里model_temp是应用 arima() 的结果函数到我观察到的时间序列
我是一名优秀的程序员,十分优秀!