Learn R Programming

dlm (version 0.7-1)

dlmModPoly: Create an n-th order polynomial DLM

Description

The function creates an n-th order polynomial DLM.

Usage

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

Arguments

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

Value

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

References

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

See Also

dlmModARMA, dlmModReg, dlmModSeas

Examples

Run this code
## the default
dlmModPoly()
## random walk plus noise
dlmModPoly(1, dV = .3, dW = .01)

Run the code above in your browser using DataLab