dlmodeler.dseasonal(ord, sigmaH = NA, sigmaQ = 0, name = "dseasonal")
deterministic.season(ord, name="deterministic season")
stochastic.season(ord, name="stochastic season")
# old function name
dlmodeler.build.dseasonal(ord, sigmaH = NA, sigmaQ = 0, name = "dseasonal")
dlmodeler
representing the dummy seasonal model.
ord
seasonal indices
$a[1], a[2], ..., a[ord]$.
The indices are constrained such that their sum equals 0, with
$a[ord] = -a[1] - a[2] - a[3] ... -a[ord-1]$.
This only requires ord
-1 state variables.The initial value P0inf
is parametered to use exact diffuse initialisation
(if supported by the back-end).
The deterministic season model, is a special case of the dseasonal model,
where sigmaH=0
and sigmaQ=0
.
The stochastic season model, is a special case of the dseasonal model,
where sigmaH=0
and sigmaQ=NA
.
dlmodeler
,
dlmodeler.build
,
dlmodeler.build.polynomial
,
dlmodeler.build.tseasonal
,
dlmodeler.build.structural
,
dlmodeler.build.arima
,
dlmodeler.build.regression
## Not run:
# require(dlmodeler)
#
# # generate some quarterly data
# n <- 80
# level <- 12
# sigma <- .75
# season <- c(5,6,8,2)
# y <- level + rep(season,n/4) + rnorm(n, mean=0, sd=sigma)
#
# # deterministic level + quarterly seasonal + disturbance
# mod <- dlmodeler.build.polynomial(0,sigmaH=sigma) +
# dlmodeler.build.dseasonal(4,sigmaH=0)
# f <- dlmodeler.filter(y, mod)
#
# # show the one step ahead forecasts
# plot(y,type='l')
# lines(f$f[1,],col='light blue')
# ## End(Not run)
Run the code above in your browser using DataLab