dlm {dlm} | R Documentation |
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.
dlm(...) as.dlm(obj) is.dlm(obj)
... |
list with named elements m0 ,
C0 , FF , V , GG , W and,
optionally,
JFF , JV , JGG , JW , and
X . The first six are the usual vector and matrices that define
a time-invariant DLM. The remaining elements are used for time-varying
DLM. X , if present, should be a matrix. If JFF is not
NULL , then it must be a matrix of the
same dimension of FF , with the (i,j) element being zero if
FF[i,j] is time-invariant, and a positive integer k
otherwise. In this case the (i,j) element of FF at time
t will be X[t,k] . A similar interpretation holds for
JV , JGG , and JW . ... may have additional
components, that are not used by dlm . The named components
may also be passed to the function as individual arguments. |
obj |
an arbitrary R object. |
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.
For dlm
, an object of class "dlm"
.
Giovanni Petris GPetris@uark.edu
dlmModReg
, dlmModPoly
,
dlmModARMA
, dlmModSeas
, to create
particular objects of class "dlm"
.
## Linear regression as a DLM x <- matrix(rnorm(10),nc=2) mod <- dlmModReg(x) is.dlm(mod) ## Adding dlm's dlmModPoly() + dlmModSeas(4) # linear trend plus quarterly seasonal component