simulate | R Documentation |
A convenient wrapper function (simulate
) to simulate data (and process error) from the likelihood function.
simulate(object, ...)
## S4 method for signature 'Assessment'
simulate(
object,
nsim = 1,
seed = NULL,
process_error = FALSE,
refit = FALSE,
cores = 1,
...
)
## S4 method for signature 'RCModel'
simulate(
object,
nsim = 1,
seed = NULL,
process_error = FALSE,
refit = FALSE,
cores = 1,
...
)
object |
An object of class Assessment or RCModel containing the fitted model. |
... |
Additional arguments |
nsim |
Number of simulations |
seed |
Used for the random number generator |
process_error |
Logical, indicates if process error is re-sampled in the simulation. |
refit |
Logical, whether to re-fit the model for each simulated dataset. |
cores |
The number of CPUs for parallel processing for model re-fitting if |
Process error, e.g., recruitment deviations, will be re-sampled in the simulation.
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
).
Q. Huynh
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.