Displaying 1 result from an estimated 1 matches for "c0_s".
Did you mean:
c0's
2012 Jan 23
0
problems with dlmBSample of the dlm package
...my mistake or my misunderstanding?
This is the code:
function (orig_ts){
library(dlm)
dV_T <- 20000
dW_T <- c(100,10)
m0_T <- rep(0,2)
C0_T <- 10000*diag(nrow=2)
my_dlmModPoly <- dlmModPoly(order=2, dV_T, dW_T, m0_T, C0_T)
dV_S <- 20000
dW_S <- c(500,0,0)
m0_S <- rep(0,3)
C0_S <- 10000*diag(nrow=3)
my_dlmModSeas <- dlmModSeas(frequency=4, dV_S, dW_S, m0_S, C0_S)
my_mod <- my_dlmModPoly + my_dlmModSeas
my_dlmFilter <- dlmFilter(orig_ts, my_mod)
my_dlmBSample <- dlmBSample(my_dlmFilter[-1])
plot(orig_ts, type = 'o', ylim=c(-200, 550))
lines(my_dlm...