search for: dlmbsampl

Displaying 2 results from an estimated 2 matches for "dlmbsampl".

Did you mean: dlmbsample
2012 Jan 23
0
problems with dlmBSample of the dlm package
Dear R users, I am trying to use the dlm package, and in particular the dlmBSample function. For some reason that I am not able to understand, this function does not work properly and the plot of the result does not make sense, while dlmFilter works perfectly. I think that my_mod is correct, because the output of my_dlmFilter$mod is fine. Where is my mistake or my misunderstandi...
2014 Jan 08
0
Strange behaviour of `dlm` package
...ular 'V' has been slightly perturbed to make it nonsingular fit$conv dlmTsdata <- buildfun(fit$par) tsdataFilter <- dlmFilter(tsdata, mod=dlmTsdata) tsdataSmooth <- dlmSmooth(tsdata, mod=dlmTsdata) plot(tsdata, lwd=2) for (i in 1:10) lines(lty=6, col="blue", dropFirst(dlmBSample(tsdataFilter))[,1]) # looks ok! tsdataForecast <- dlmForecast(tsdataFilter, nAhead=20) sqrtR <- sapply(tsdataForecast$R, function(x) sqrt(x[1,1])) pl <- tsdataForecast$a[,1] + qnorm(0.05, sd= sqrtR) pu <- tsdataForecast$a[,1] + qnorm(0.95, sd= sqrtR) x <- ts.union(tsdata,tsdataSm...