dlmModPoly function

Create an n-th order polynomial DLM

Create an n-th order polynomial DLM

The function creates an nn-th order polynomial DLM.

dlmModPoly(order = 2, dV = 1, dW = c(rep(0, order - 1), 1), m0 = rep(0, order), C0 = 1e+07 * diag(nrow = order))

Arguments

  • order: order of the polynomial model. The default corresponds to a stochastic linear trend.
  • dV: variance of the observation noise.
  • dW: diagonal elements of the variance matrix of the system noise.
  • m0: m0m0, the expected value of the pre-sample state vector.
  • C0: C0C0, the variance matrix of the pre-sample state vector.

Returns

An object of class dlm representing the required n-th order polynomial model.

References

Giovanni Petris (2010), An R Package for Dynamic Linear Models. Journal of Statistical Software, 36(12), 1-16. https://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.

Author(s)

Giovanni Petris GPetris@uark.edu

See Also

dlmModARMA, dlmModReg, dlmModSeas

Examples

## the default dlmModPoly() ## random walk plus noise dlmModPoly(1, dV = .3, dW = .01)
  • Maintainer: Giovanni Petris
  • License: GPL (>= 2)
  • Last published: 2024-09-21

Useful links