data.gen.LGSS {synthesis} | R Documentation |
Linear Gaussian state-space model
Description
Generates data from a specific linear Gaussian state space model of the form
x_{t} = \phi x_{t-1} + \sigma_v v_t
and y_t = x_t +
\sigma_e e_t
, where v_t
and e_t
denote independent standard
Gaussian random variables, i.e. N(0,1)
.
Usage
data.gen.LGSS(
theta,
nobs,
start = runif(n = 1, min = -1, max = 1),
do.plot = TRUE
)
Arguments
theta |
The parameters |
nobs |
The data length to be generated. |
start |
A numeric value indicating the starting value for the time series. If the starting point is not specified, it is generated randomly. |
do.plot |
Logical value. If TRUE (default value), a plot of the generated LGSS system is shown. |
Value
A list of two variables, state and response.
References
#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.
Examples
data.LGSS <- data.gen.LGSS(theta=c(0.75,1.00,0.10), nobs=500, start=0)