add_prior_trend | R Documentation |
The Beta distribution defined via alpha
and beta
is the prior on the
product \alpha \cdot \beta
, where \alpha
and \beta
are the
smoothing parameters for the level and trend components of the model.
add_prior_trend(priors = NULL, prob, guess, n, verbose = FALSE, plot = FALSE)
priors |
A list containing other, already defined, priors. If NULL, a
list will be started with |
prob |
Probability that the time series has a local-linear trend, and that therefore a trend component should be included in the model. This parameterizes a Bernoulli distribution and should thus be a value in (0,1). |
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? |
The trend component is updated via \alpha \cdot \beta \cdot \epsilon_t
.
When \alpha=0
, then the trend component will not change over time
because the level component does not adjust to recent observations of the
time series. Every value of \beta
then has the same effect.
Specifying the prior directly on the interaction makes it easier to enforce
an expected effective behavior of the trend. Independent of the value of
\alpha
(except for \alpha = 0
), a small value for
\alpha \cdot \beta
implies that the trend will adjust slowly to more
recent observations.
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.
A list that includes a list named trend
, which is a list with
prob
, alpha
, and beta
key-value pairs.
add_prior_seasonality()
, add_prior_level()
, add_prior_error()
,
add_prior_anomaly()
ps <- add_prior_trend(
priors = NULL,
prob = 0.75,
guess = 1/15,
n = 15,
verbose = TRUE,
plot = TRUE
)
print(ps)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.