Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dlmRandom

Random DLM


Description

Generate a random (constant or time-varying) object of class "dlm", along with states and observations from it.

Usage

dlmRandom(m, p, nobs = 0, JFF, JV, JGG, JW)

Arguments

m

dimension of the observation vector.

p

dimension of the state vector.

nobs

number of states and observations to simulate from the model.

JFF

should the model have a time-varying FF component?

JV

should the model have a time-varying V component?

JGG

should the model have a time-varying GG component?

JW

should the model have a time-varying W component?

Details

The function generates randomly the system and observation matrices and the variances of a DLM having the specified state and observation dimension. The system matrix GG is guaranteed to have eigenvalues strictly less than one, which implies that a constant DLM is asymptotically stationary. The default behavior is to generate a constant DLM. If JFF is TRUE then a model for nobs observations in which all the elements of FF are time-varying is generated. Similarly with JV, JGG, and JW.

Value

The function returns a list with the following components.

mod

An object of class "dlm".

theta

Matrix of simulated state vectors from the model.

y

Matrix of simulated observations from the model.

If nobs is zero, only the mod component is returned.

Author(s)

Giovanni Petris GPetris@uark.edu

References

Anderson and Moore, Optimal filtering, Prentice-Hall (1979)

See Also

Examples

dlmRandom(1, 3, 5)

dlm

Bayesian and Likelihood Analysis of Dynamic Linear Models

v1.1-5
GPL (>= 2)
Authors
Giovanni Petris [aut, cre], Wally Gilks [ctb] (Author of original C code for ARMS)
Initial release
2018-05-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.