Description Usage Arguments Value See Also
bsts_season()
is a generic that wraps the two seasonal models in the
bsts package into a user-friendly interface. Model-specific arguments are
passed via ...
; see the two methods for details of those arguments.
bsts_seasonal()
also uses the timetk package to make model specification
easier or, if you prefer, automate it entirely based on tunable heuristics.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | bsts_season(
state = list(),
.data = state[[".data"]],
method = c("regression", "harmonic", "dynamic"),
period = NULL,
season = NULL,
sigma.prior = NULL,
initial.state.prior = NULL,
sdy = NULL
)
## S3 method for class 'regression'
bsts_season(
state = list(),
.data = state[[".data"]],
method = "regression",
period = NULL,
season = NULL,
sigma.prior = NULL,
initial.state.prior = NULL,
sdy = NULL
)
## S3 method for class 'harmonic'
bsts_season(
state = list(),
.data = state[[".data"]],
method = "harmonic",
period = NULL,
season = NULL,
sigma.prior = NULL,
initial.state.prior = NULL,
sdy = NULL
)
|
state |
A list of state components you wish to add to. If omitted,
an empty list will be assumed. This argument is named |
.data |
The time series to be modeled, as a numeric vector. Unlike bsts, this is piped forward as part of the state if defined, so you only need to specify it once (at the beginning of the model-building pipeline). |
method |
Which seasonal model to use. Choose from |
period |
The length of a full seasonal cycle. Either a time-based definition (e.g. "1 week")
or the number of observations in a season (e.g. 7). Supplying a
number makes this equivalent to |
season |
The length of a season within a period (e.g. "1 month" for a 1
year period with monthly seasonality); the default is one season per
observation within a period. Can be supplied in the same
way as |
sigma.prior |
An object created by |
initial.state.prior |
An object created by
|
sdy |
The standard deviation of the series to be modeled. This will be ignored if y is provided, or if all the required prior distributions are supplied directly |
A list with the updated state specification of a bsts model
Other bsts:
bsts_trend()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.