Skip to content

Example assumes MTS is installed #433

@MichaelChirico

Description

@MichaelChirico

fable/R/VARIMA.R

Lines 177 to 178 in 70e55ac

#' fit <- aus_production %>%
#' model(VARIMA(vars(Beer, Cement) ~ pdq(4,1,1), identification = "none"))

Without MTS we get a somewhat unpalatable failure:

> library(tsibbledata)
> aus_production %>% autoplot(vars(Beer, Cement))
> fit <- aus_production %>% model(VARIMA(vars(Beer, Cement) ~ pdq(4, 1, 
+     1), identification = "none"))
Warning: 1 error encountered for VARIMA(vars(Beer, Cement) ~ pdq(4, 1, 1), identification = "none")
[1] The `MTS` package must be installed to use this functionality. It can be installed with install.packages("MTS")

> fit
# A mable: 1 x 1
  `VARIMA(vars(Beer, Cement) ~ pdq(4, 1, 1), identification = "none")`
                                                               <model>
1                                                         <NULL model>
> ## End(Don't show)
> ## Don't show: 
> if (requireNamespace("tsibbledata", quietly = TRUE)) (if (getRversion() >= "3.4") withAutoprint else force)({ # examplesIf
+ ## End(Don't show)
+ 
+ fit %>%
+   forecast(h = 50) %>%
+   autoplot(tail(aus_production, 100))
+ ## Don't show: 
+ }) # examplesIf
> fit %>% forecast(h = 50) %>% autoplot(tail(aus_production, 100))
Error in FUN(X[[i]], ...) : 
  attempt to set 'colnames' on an object with less than two dimensions

Only from staring at this sort of log for long enough was I able to piece together what's gone wrong.

Related: #432

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions