Description Usage Arguments Details Value Examples
A bsts model consists of terms which are additively included in the model.
1 2 | ## S3 method for class 'fbl_bsts'
components(object, ...)
|
object |
An estimated model. |
... |
Unused. |
Extracting a bsts model's components using this function allows you to
visualise the components in a similar way to bsts::plotBstsComponents()
.
A fabletools::dable()
containing estimated states.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | if (requireNamespace("tsibbledata")) {
library(tsibble)
library(dplyr)
beer_components <- tsibbledata::aus_production %>%
model(
bsts = BSTS(Beer ~ season("year"))
) %>%
components()
beer_components
## Not run:
autoplot(beer_components)
library(ggplot2)
library(lubridate)
beer_components %>%
ggplot(aes(x = quarter(Quarter), y = year, group = year(Quarter))) +
geom_line()
## End(Not run)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.