View source: R/SpecPrior-generators.R
Season | R Documentation |
A DLM
prior can contain a seasonal effect, which
is specified using function Season
. Season effects can
can change over time.
Season(n, scale = HalfT())
n |
Number of seasons. An integer greater than 1. |
scale |
Prior for the |
In a prior for a main effect, the seasonal effect has the form
s[j] = s[j-n] + errorSeason[j],
where n
is the number of seasons.
In a prior for an interaction, the seasonal effect has the form
s[k,l] = s[k-n,l] + errorSeason[k,l].
(See the documentation for function DLM
for
an explanation of the k,l
subscripts.)
The error term has the form
errorSeason[j] ~ N(0, scaleSeason^2)
or
errorSeason[k,l] ~ N(0, scaleSeason^2)
.
Standard deviation scaleSeason
has a half-t prior,
which can be specified using function HalfT
.
Season effects are not fixed, but instead evolve over time. The speed
with which season effects change is governed by scaleSeason
.
An object of class Season
Season
supplies an option argument
to function DLM
.
Season(n = 4)
Season(n = 2, scale = HalfT(scale = 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.