rickerSimul {synlik} | R Documentation |
Simulates from the ricker model
Description
Simulator for the stochastic Ricker model, as described by Wood (2010). The observations are Y_t ~ Pois(Phi * N_t), and the dynamics of the hidden state are given by N_t = r * N_{t-1} * exp( -N_{t-1} + e_t ), where e_t ~ N(0, Sigma^2).
Usage
rickerSimul(param, nsim, extraArgs, ...)
Arguments
param |
vector of log-parameters: logR, logSigma, logPhi. Alternatively a matrix |
nsim |
Number of simulations from the model. |
extraArgs |
A named list of additional arguments:
|
... |
Need for compatibility with |
Value
A matrix nsim
by nObs
, where each row is a simulated path.
Author(s)
Simon Wood and Matteo Fasiolo <matteo.fasiolo@gmail.com>.
References
Simon N Wood. Statistical inference for noisy nonlinear ecological dynamic systems. Nature, 466(7310):1102–1104, 2010.
See Also
Examples
tmp <- rickerSimul(c(3.8, -1.2, 2.3), nsim = 2, extraArgs = list("nObs" = 50, "nBurn" = 200))
matplot(t(tmp), type = 'l', ylab = "Y", xlab = "Time")
parMat <- rbind(c(3.8, -1.2, 2.3), # Chaotic
c(2.5, -1.2, 2.3)) # Not Chaotic
par(mfrow = c(2, 1))
tmp <- rickerSimul(parMat, nsim = 2, extraArgs = list("nObs" = 50, "nBurn" = 200))
plot(tmp[1, ], type = 'l', ylab = "Y", xlab = "Time")
plot(tmp[2, ], type = 'l', ylab = "Y", xlab = "Time")