I think this may have to do with the seasonal special, but we're getting NULL models on yearmonth data when normal dates work. We're also seeing both return NULL models for a seasonal call of 1 month regardless of date format.
library(tidyverse)
library(fabletools)
library(fable)
devtools::install_github('bradisbrad/fable.bsts')
#> Skipping install of 'fable.bsts' from a github remote, the SHA1 (9b263921) has not changed since last install.
#> Use `force = TRUE` to force installation
source('~/proj/pers/repo/fable.bsts/data-raw/lax_passengers.R')
#>
#> Attaching package: 'lubridate'
#> The following object is masked from 'package:tsibble':
#>
#> interval
#> The following objects are masked from 'package:base':
#>
#> date, intersect, setdiff, union
#> `summarise()` regrouping output by 'date' (override with `.groups` argument)
data <- lax_passengers %>%
mutate(date = yearmonth(date))
data %>%
fabletools::model(
bsts = fable.bsts::BSTS(passengers ~ intercept() + ar() + seasonal('1 week'))
)
#> Warning: 2 errors (1 unique) encountered for bsts
#> [2] order.by requires an appropriate time-based object
#> # A mable: 2 x 2
#> # Key: type [2]
#> type bsts
#> <chr> <model>
#> 1 Domestic <NULL model>
#> 2 International <NULL model>
data <- lax_passengers
data %>%
fabletools::model(
bsts = fable.bsts::BSTS(passengers ~ intercept() + ar() + seasonal('1 week'))
)
#> # A mable: 2 x 2
#> # Key: type [2]
#> type bsts
#> <chr> <model>
#> 1 Domestic <BSTS>
#> 2 International <BSTS>
data %>%
fabletools::model(
bsts = fable.bsts::BSTS(passengers ~ intercept() + ar() + seasonal('1 month'))
)
#> Warning: 2 errors (1 unique) encountered for bsts
#> [2] nseasons == round(nseasons) is not TRUE
#> # A mable: 2 x 2
#> # Key: type [2]
#> type bsts
#> <chr> <model>
#> 1 Domestic <NULL model>
#> 2 International <NULL model>
Potential seasonal or date format issue
I think this may have to do with the seasonal special, but we're getting NULL models on yearmonth data when normal dates work. We're also seeing both return NULL models for a seasonal call of 1 month regardless of date format.
Created on 2020-09-09 by the reprex package (v0.3.0)