ucm
decomposes a time series into components such as trend, seasonal, cycle, and the regression effects due to predictor series using Unobserved Components Model (UCM).
ucm(formula, data, irregular = TRUE, irregular.var = NA, level = TRUE, level.var = NA, slope = FALSE, slope.var = NA, season = FALSE, season.length = NA, season.var = NA, cycle = FALSE, cycle.period = NA, cycle.var = NA)
formula
containing the symbolic description of the model with dependent and independent terms. If there are no independent terms, replace rhs with 0.TRUE
.TRUE
.FALSE
.FALSE
.season
is included.FALSE
.cycle
is included.ucm
, which is a list with the following components:
SSModel
from KFAS
package.lm
with response variable on rhs and predictor variables or 0 (if no predictor variables) on the rhs.
KFAS
, SSModel
for a detailed discussion on State Space Models.
modelNile <- ucm(Nile~0, data = Nile, slope = TRUE)
modelNile
modelNile$s.level
Run the code above in your browser using DataLab