simNonlin: Simulates from a simple nonlinear state space model.

View source: R/simNonlin.R

simNonlinR Documentation

Simulates from a simple nonlinear state space model.

Description

The simNonlin function simulates data from the models used in link{pfNonlinBS} and link{nonLinPMMH}.

Usage

simNonlin(len = 50, var_init = 10, var_evol = 10, var_obs = 1,
  cosSeqOffset = -1)

Arguments

len

The length of data sequence to simulate.

var_init

The variance of the noise for the initial state.

var_evol

The variance of the noise for the state evolution .

var_obs

The variance of the observation noise.

cosSeqOffset

This is related to the indexing in the cosine function in the evoluation equation. A value of -1 can be used to follow the specification of Gordon, Salmond and Smith (1993) and 0 can be used to follow Andrieu, Doucet and Holenstein (2010).

Details

The simNonlin function simulates from a simple nonlinear state space model with state evolution and observation equations:

x(n) = 0.5 x(n-1) + 25 x(n-1) / (1+x(n-1)^2) + 8 cos(1.2(n+cosSeqOffset))+ e(n) and

y(n) = x(n)^2 / 20 + f(n)

where e(n) and f(n) are mutually-independent normal random variables of variances var_evol and var_obs, respectively, and x(0) ~ N(0,var_init).

Different variations of this model can be found in Gordon, Salmond and Smith (1993) and Andrieu, Doucet and Holenstein (2010). A cosSeqOffset of -1 is consistent with the former and 0 is consistent with the latter.

Value

The simNonlin function returns a list containing the state and data sequences.

Author(s)

Adam M. Johansen, Dirk Eddelbuettel and Leah F. South

References

C. Andrieu, A. Doucet, and R. Holenstein. Particle Markov chain Monte Carlo methods. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 72(3):269-342, 2010.

N. J. Gordon, S. J. Salmond, and A. F. M. Smith. Novel approach to nonlinear/non-Gaussian Bayesian state estimation. IEE Proceedings-F, 140(2):107-113, April 1993.

See Also

pfNonlinBS for a simple bootrap particle filter applied to this model and nonLinPMMH for particle marginal Metropolis Hastings applied to estimating the standard deviation of the state evolution and observation noise.


RcppSMC documentation built on March 31, 2023, 10:14 p.m.