Description Usage Arguments Value Author(s) References
View source: R/dataGeneration.R
Generates data from a specific linear Gaussian state space model of the form x_{t} = φ x_{t-1} + σ_v v_t and y_t = x_t + σ_e e_t , where v_t and e_t denote independent standard Gaussian random variables, i.e. N(0,1).
1 | generateData(theta, noObservations, initialState)
|
theta |
The parameters θ=\{φ,σ_v,σ_e\} of the LGSS model. The parameter φ that scales the current state in the state dynamics is restricted to [-1,1] to obtain a stable model. The standard deviations of the state process noise σ_v and the observation process noise σ_e must be positive. |
noObservations |
The number of time points to simulate. |
initialState |
The initial state. |
The function returns a list with the elements:
x: The latent state for t=0,...,T.
y: The observation for t=0,...,T.
Johan Dahlin uni@johandahlin.com
Dahlin, J. & Schon, T. B. "Getting Started with Particle Metropolis-Hastings for Inference in Nonlinear Dynamical Models." Journal of Statistical Software, Code Snippets, 88(2): 1–41, 2019.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.