The function dlm is used to create Dynamic Linear Model objects.
as.dlm and is.dlm coerce an object to a Dynamic Linear
Model object and test whether an object is a Dynamic Linear Model.
Usage
dlm(...)
as.dlm(obj)
is.dlm(obj)
Arguments
...
A list with named elements m0,
C0, FF, V, GG, W and,
optionally,
JFF, JV, JGG, JW, and
X. The f
obj
An arbitrary Robject.
Value
For dlm, an object of class "dlm".
Details
The function dlm is used to create Dynamic Linear Model
objects. These are lists with the named elements described above and
with class of "dlm".
Class "dlm" has a number of methods. In particular, consistent
DLM can be added together to produce another DLM.
## Linear regression as a DLMx <- matrix(rnorm(10),nc=2)
mod <- dlmModReg(x)
is.dlm(mod)
## Adding dlm'sdlmModPoly() + dlmModSeas(4) # linear trend plus quarterly seasonal component