powered by
This function simulates sequences of variates follow a nonlinear autoregressive order 1 process of the form z_n = g(z_n-1) + epsilon. A normal distribution is assumed for the innovations.
nonlinearAR1.sim(n, g, ...)
number of observations.
autoregression function.
any parameters that are taken by rnorm
rnorm
L. Han and S. Snyman
x <- nonlinearAR1.sim(50, g = function(x) x*sin(x), sd = 2.5) ts.plot(x)
Run the code above in your browser using DataLab