小编usu*_*sed的帖子

寓言:从 ARIMA 模型中提取 p,d,q 规范

我一直在使用 tidy 预测包寓言(它非常有用)。

我想知道是否有一种简单的方法可以从 mable 中提取 p、d、q 值。

以本指南中的数据为例https://www.mitchelloharawild.com/blog/fable/

library(tidyverse)
library(tsibble)
library(fable)

tourism_state <- tourism %>% 
  group_by(State) %>% 
  summarise(Trips = sum(Trips))

fit <- tourism_state %>% 
  model(arima = ARIMA(Trips))
Run Code Online (Sandbox Code Playgroud)
> fit
# A mable: 8 x 2
# Key:     State [8]
  State                                 arima
  <chr>                               <model>
1 ACT                          <ARIMA(0,1,1)>
2 New South Wales    <ARIMA(0,1,1)(0,1,1)[4]>
3 Northern Territory <ARIMA(1,0,1)(0,1,1)[4]>
4 Queensland                   <ARIMA(2,1,2)>
5 South Australia    <ARIMA(1,0,1)(0,1,1)[4]>
6 Tasmania           <ARIMA(0,0,3)(2,1,0)[4]>
7 Victoria           <ARIMA(0,1,1)(0,1,1)[4]>
8 Western Australia            <ARIMA(0,1,3)>
Run Code Online (Sandbox Code Playgroud)

我知道规格存储在 model[[1]]$fit$spec 下,但如果我有大量模型,我无法找到提取它们的方法

理想情况下我想要

  State                                 arima …
Run Code Online (Sandbox Code Playgroud)

r arima fable-r

5
推荐指数
1
解决办法
125
查看次数

标签 统计

arima ×1

fable-r ×1

r ×1