add_prior_level | R Documentation |
The Beta distribution defined via alpha
and beta
is the prior on the
\alpha
parameter of the estimated model. For example, if we expect that
the level of the time series varies slowly over time, and thus only a
small part of the error component is used to update the level at each time
point, then a small alpha
and larger beta
make sense.
add_prior_level(priors = NULL, guess, n, verbose = FALSE, plot = FALSE)
priors |
A list containing other, already defined, priors. If NULL, a
list will be started with |
guess |
Which |
n |
How much weight (n terms of observations) do you want to give your prior assumption? The larger this value, the more data observations it will take to wash out your prior distribution in case it is misspecified. |
verbose |
Should summarizing information be printed using |
plot |
Should a simple plot of the implied Beta density be drawn? |
Note: In contrast to the trend and seasonal components, we don't specify an
"inclusion" probability prob
on the level component. The level component
is always used.
The mean of the Beta distribution is \mu = \alpha / (\alpha + \beta)
.
If alpha
is smaller or equal than 1, then the density will be highest at 0.
Values of alpha
closer to 0 imply a non-fluctating i.i.d. level component,
while values of alpha
closer to 1 imply a more random-walk-like behavior.
A list that includes a list named level
, which is a list with
prob
, alpha
, and beta
key-value pairs.
add_prior_seasonality()
, add_prior_trend()
, add_prior_error()
,
add_prior_anomaly()
ps <- add_prior_level(
priors = list(), guess = 1/7, n = 6, verbose = TRUE, plot = TRUE
)
print(ps)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.