I've been using the tidy forecasting package fable (which has been so useful).
I was wondering if there was an easy way to extract that the p,d,q values from a mable.
Using the data on this guide as an example 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))
> 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)>
I know the specifications are stored under model[[1]]$fit$spec but I can't figure out a way to extract them if I have a large list of models
Ideally I'd like
State arima p d q
<chr> <model>
1 ACT <ARIMA(0,1,1)> 0 1 1
2 New South Wales <ARIMA(0,1,1)(0,1,1)[4]> 0 1 1
3 Northern Territory <ARIMA(1,0,1)(0,1,1)[4]> 1 0 1
4 Queensland <ARIMA(2,1,2)>
5 South Australia <ARIMA(1,0,1)(0,1,1)[4]> and so on....
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)>
Thanks!