simulate,synlik-method {synlik} | R Documentation |
Simulate data or statistics from an object of class synlik
.
Description
Simulate data or statistics from an object of class synlik
.
Usage
## S4 method for signature 'synlik'
simulate(object, nsim, seed = NULL, param = object@param,
stats = FALSE, clean = TRUE, verbose = TRUE, ...)
Arguments
object |
An object of class |
nsim |
Number of simulations from the model. |
seed |
Random seed to be used. It is not passed to the simulator, but simply passed to |
param |
Vector of parameters passed to |
stats |
If |
clean |
If |
verbose |
If |
... |
additional arguments to be passed to |
Value
If stats == FALSE
the output will that of object@simulator
, which depends on the simulator used by the user.
If stats == TRUE
the output will be a matrix where each row is vector of simulated summary statistics.
Author(s)
Matteo Fasiolo <matteo.fasiolo@gmail.com>
See Also
Examples
data(ricker_sl)
# Simulate data
simulate(ricker_sl, nsim = 2)
# Simulate statistics
simulate(ricker_sl, nsim = 2, stats = TRUE)