Description Usage Arguments Details Value Author(s) References See Also Examples

The function simulates one draw from the posterior distribution of the state vectors.

1 | ```
dlmBSample(modFilt)
``` |

`modFilt` |
a list, typically the ouptut from |

The calculations are based on singular value decomposition.

The function returns a draw from the posterior distribution
of the state vectors. If `m`

is a time series then the returned
value is a time series with the same `tsp`

, otherwise it is
a matrix or vector.

Giovanni Petris [email protected]

Giovanni Petris (2010), An R Package for Dynamic Linear
Models. Journal of Statistical Software, 36(12), 1-16.
http://www.jstatsoft.org/v36/i12/.

Petris, Petrone, and Campagnoli, Dynamic Linear Models with
R, Springer (2009).

West and Harrison, Bayesian forecasting and
dynamic models (2nd ed.), Springer (1997).

See also `dlmFilter`

1 2 3 4 5 6 7 8 | ```
nileMod <- dlmModPoly(1, dV = 15099.8, dW = 1468.4)
nileFilt <- dlmFilter(Nile, nileMod)
nileSmooth <- dlmSmooth(nileFilt) # estimated "true" level
plot(cbind(Nile, nileSmooth$s[-1]), plot.type = "s",
col = c("black", "red"), ylab = "Level",
main = "Nile river", lwd = c(2, 2))
for (i in 1:10) # 10 simulated "true" levels
lines(dlmBSample(nileFilt[-1]), lty=2)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.