add.static.intercept  R Documentation 
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 datadetermined value.
AddStaticIntercept(
state.specification,
y,
initial.state.prior = NormalPrior(y[1], sd(y, na.rm = TRUE)))
state.specification 
A list of state components that you wish to add to. If omitted, an empty list will be assumed. 
y 
The time series to be modeled, as a numeric vector. 
initial.state.prior 
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.
bsts
.
SdPrior
NormalPrior
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.