-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I followed the example in Section 3.5 of fpp3 to specify seats as a special, but using aus_production data for beer instead of us_retail_employment. It did not remove the seasonality (QS is very high) and reports that it was not a decomposition. Leaving out the seas special it worked, but with a note I do not understand.
library(fpp3)
fitseats <- aus_production %>%
model(X_13ARIMA_SEATS(Beer ~ seats()))
report(fitseats)
#> Series: Beer
#> Model: X-13ARIMA-SEATS
#>
#> Coefficients:
#> Estimate Std. Error z value Pr(>|z|)
#> MA-Nonseasonal-01 0.96503 0.06307 15.301 < 2e-16 ***
#> MA-Nonseasonal-02 -0.34106 0.06362 -5.361 8.26e-08 ***
#> MA-Seasonal-04 0.77186 0.04380 17.621 < 2e-16 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> SEATS adj. ARIMA: (0 1 2)(0 1 1) Obs.: 0 Transform: log
#> AICc: 1748, BIC: 1761 QS (no seasonality in final):157.3 ***
#> Box-Ljung (no autocorr.): 16.09 Shapiro (normality): 0.994
components(fitseats)
#> Error: Problem with `mutate()` input `cmp`.
#> x The X-13ARIMA-SEATS model does not contain a decomposition, are you missing a seasonal component?
#> ℹ Input `cmp` is `map(.fit, components)`.
fit <- aus_production %>%
model(X_13ARIMA_SEATS(Beer))
report(fit)
#> Series: Beer
#> Model: X-13ARIMA-SEATS
#>
#> Coefficients:
#> Estimate Std. Error z value Pr(>|z|)
#> MA-Nonseasonal-01 0.96503 0.06307 15.301 < 2e-16 ***
#> MA-Nonseasonal-02 -0.34106 0.06362 -5.361 8.26e-08 ***
#> MA-Seasonal-04 0.77186 0.04380 17.621 < 2e-16 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> SEATS adj. ARIMA: (0 1 2)(0 1 1) Obs.: 218 Transform: log
#> AICc: 1748, BIC: 1761 QS (no seasonality in final): 0
#> Box-Ljung (no autocorr.): 16.09 Shapiro (normality): 0.994
#> Messages generated by X-13:
#> Notes:
#> - Model used for SEATS decomposition is different from the model
#> estimated in the regARIMA modeling module of X-13ARIMA-SEATS.
components(fit)
#> # A dable: 218 x 7 [1Q]
#> # Key: .model [1]
#> # : Beer = f(trend, seasonal, irregular)
#> .model Quarter Beer trend seasonal irregular season_adjust
#> <chr> <qtr> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 X_13ARIMA_SEATS(Beer) 1956 Q1 284 255. 1.05 1.06 271.
#> 2 X_13ARIMA_SEATS(Beer) 1956 Q2 213 255. 0.860 0.970 248.
#> 3 X_13ARIMA_SEATS(Beer) 1956 Q3 227 256. 0.912 0.973 249.
#> 4 X_13ARIMA_SEATS(Beer) 1956 Q4 308 257. 1.19 1.01 258.
#> 5 X_13ARIMA_SEATS(Beer) 1957 Q1 262 258. 1.04 0.976 251.
#> 6 X_13ARIMA_SEATS(Beer) 1957 Q2 228 259. 0.863 1.02 264.
#> 7 X_13ARIMA_SEATS(Beer) 1957 Q3 236 260. 0.915 0.992 258.
#> 8 X_13ARIMA_SEATS(Beer) 1957 Q4 320 261. 1.19 1.03 268.
#> 9 X_13ARIMA_SEATS(Beer) 1958 Q1 272 262. 1.04 1.00 262.
#> 10 X_13ARIMA_SEATS(Beer) 1958 Q2 233 262. 0.864 1.03 270.
#> # … with 208 more rows
Created on 2021-03-25 by the reprex package (v1.0.0)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working