## 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