Adds a static intercept term to a state space model. If the model includes a traditional trend component (e.g. local level, local linear trend, etc) then a separate intercept is not needed (and will probably cause trouble, as it will be confounded with the initial state of the trend model). However, if there is no trend, or the trend is an AR process centered around zero, then adding a static intercept will shift the center to a data-determined value.
AddStaticIntercept( state.specification, y, initial.state.prior = NormalPrior(y, sd(y, na.rm = TRUE)))
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.
An object created using
Returns a list with the information required to specify the state component. If initial.state.prior is specified then y is unused.
Steven L. Scott
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.