Description Usage Arguments Value See Also
bsts_trend()
is a generic that wraps the various trend models in the
bsts package into a user-friendly interface. Model-specific arguments are
passed via ...
; see the four methods for details of those arguments.
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | bsts_trend(
state = list(),
.data = state[[".data"]],
method = c("semilocal", "local", "robust", "level"),
...
)
## S3 method for class 'semilocal'
bsts_trend(
state = list(),
.data = state[[".data"]],
method = "semilocal",
level.sigma.prior = NULL,
slope.mean.prior = NULL,
slope.ar1.prior = NULL,
slope.sigma.prior = NULL,
initial.level.prior = NULL,
initial.slope.prior = NULL,
sdy = NULL,
initial.y = NULL
)
## S3 method for class 'local'
bsts_trend(
state = list(),
.data = state[[".data"]],
method = "local",
level.sigma.prior = NULL,
slope.sigma.prior = NULL,
initial.level.prior = NULL,
initial.slope.prior = NULL,
sdy = NULL,
initial.y = NULL
)
## S3 method for class 'robust'
bsts_trend(
state = list(),
.data = state[[".data"]],
method = "robust",
save.weights = FALSE,
level.sigma.prior = NULL,
level.nu.prior = NULL,
slope.sigma.prior = NULL,
slope.nu.prior = NULL,
initial.level.prior = NULL,
initial.slope.prior = NULL,
sdy = NULL,
initial.y = NULL
)
## S3 method for class 'level'
bsts_trend(
state = list(),
.data = state[[".data"]],
method = "level",
sigma.prior = NULL,
initial.state.prior = NULL,
sdy = NULL,
initial.y = 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 trend model to use. Choose from |
... |
Additional arguments to pass to methods; see the methods above for details |
level.sigma.prior |
An object created by
|
slope.mean.prior |
An object created by
|
slope.ar1.prior |
An object created by
|
slope.sigma.prior |
An object created by
|
initial.level.prior |
An object created by
|
initial.slope.prior |
An object created by
|
sdy |
The standard deviation of the series to be modeled. This
will be ignored if |
initial.y |
The initial value of the series being modeled. This will be
ignored if |
save.weights |
A logical value indicating whether to save the draws of the weights from the normal mixture representation. |
level.nu.prior |
An object inheritng from the class
|
slope.nu.prior |
An object inheritng from the class
|
sigma.prior |
An object created by |
initial.state.prior |
An object created using
|
A list with the elements necessary to specify the chosen trend model
bsts()
,
AddSemilocalLinearTrend()
,
AddLocalLinearTrend()
,
AddStudentLocalLinearTrend()
,
AddLocalLevel()
Other bsts:
bsts_season()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.