Description Usage Arguments Details Value Author(s) References See Also Examples
Add two DLMs together, performing an outer sum.
Multiply a model by a numeric constant.
Bind two DLMs together, creating a multi-variate model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | dlmodeler.add(e1, e2, name = NULL)
## S3 method for class 'dlmodeler'
e1 + e2
dlmodeler.multiply(e1, e2)
## S3 method for class 'dlmodeler'
e1 * e2
dlmodeler.bind(e1, e2, name = NULL)
## S3 method for class 'dlmodeler'
e1 %% e2
|
e1, e2 |
an object of class |
name |
an optional name to be given to the resulting DLM. |
Addition: The state vector of the resulting DLM is equal to the concatenation of
the state vectors of mod1
and mod2
. The observation vector of the
resulting DLM is equal to the sum of the observation vectors of mod1
and
mod2
.
Multiplication: the observation vector of the resulting DLM is multiplied by the supplied numeric constant.
Binding: The state vector of the resulting DLM is equal to the concatenation of
the state vectors of mod1
and mod2
. The observation vector of the
resulting DLM is equal to the concatenation of the observation vectors of
mod1
and mod2
.
An object of class dlmodeler
.
Cyrille Szymanski <cnszym@gmail.com>
Giovanni Petris, An R Package for Dynamic Linear Models. Journal of Statistical Software, 36(12), 1-16. http://www.jstatsoft.org/v36/i12/.
1 2 3 4 5 6 7 8 9 10 | require(dlmodeler)
# create the following model:
# deterministic level + quarterly seasonal + disturbance
mod1 <- dlmodeler.build.polynomial(0,sigmaH=.1) +
4* dlmodeler.build.dseasonal(4,sigmaH=0)
# create a multivariate model by binding the previous model
# with a stochastic trend model
mod2 <- mod1 %% dlmodeler.build.polynomial(1,sigmaH=0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.