Last chance! 50% off unlimited learning
Sale ends in
The semi-local linear trend model is similar to the local linear
trend, but more useful for long-term forecasting. It assumes the
level component moves according to a random walk, but the slope
component moves according to an AR1 process centered on a
potentially nonzero value
The equation for the slope is
This model differs from the local linear trend model in that the
latter assumes the slope
The prior distribution for the semi-local linear trend has four independent components. These are:
an inverse gamma prior on the level
standard deviation
an inverse gamma prior on the slope standard deviation
a Gaussian prior on the long run slope parameter
and a potentially truncated Gaussian prior on the AR1
coefficient
AddSemilocalLinearTrend(
state.specification = list(),
y = NULL,
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)
A list of state components that you wish to add to. If omitted, an empty list will be assumed.
The time series to be modeled, as a numeric vector. This can
be omitted if sdy
and initial.y
are supplied, or if
all prior distributions are supplied directly.
An object created by
SdPrior
describing the prior
distribution for the standard deviation of the level component.
An object created by
NormalPrior
giving the prior distribution for
the mean parameter in the generalized local linear trend model (see
below).
An object created by
Ar1CoefficientPrior
giving the prior
distribution for the ar1 coefficient parameter in the generalized
local linear trend model (see below).
An object created by
SdPrior
describing the prior distribution of
the standard deviation of the slope component.
An object created by
NormalPrior
describing the initial distribution
of the level portion of the initial state vector.
An object created by
NormalPrior
describing the prior distribution
for the slope portion of the initial state vector.
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.
The initial value of the series being modeled. This will be
ignored if y
is provided, or if the priors for the initial
state are all provided directly.
Returns a list with the elements necessary to specify a generalized local linear trend state model.
Harvey (1990), "Forecasting, structural time series, and the Kalman filter", Cambridge University Press.
Durbin and Koopman (2001), "Time series analysis by state space methods", Oxford University Press.