A convenient wrapper function (simulate
) to simulate data (and process error) from the likelihood function.
simulate(object, ...)# S4 method for Assessment
simulate(
object,
nsim = 1,
seed = NULL,
process_error = FALSE,
refit = FALSE,
cores = 1,
...
)
# S4 method for RCModel
simulate(
object,
nsim = 1,
seed = NULL,
process_error = FALSE,
refit = FALSE,
cores = 1,
...
)
A sim object returning the original data, simulated data, original parameters, parameters estimated
from simulated data, and process error used to simulate data.
then a nested list of model output (opt
, SD
, and report
).
An object of class Assessment or RCModel containing the fitted model.
Additional arguments
Number of simulations
Used for the random number generator
Logical, indicates if process error is re-sampled in the simulation.
Logical, whether to re-fit the model for each simulated dataset.
The number of CPUs for parallel processing for model re-fitting if refit = TRUE
.
Q. Huynh
Process error, e.g., recruitment deviations, will be re-sampled in the simulation.