Generate a random sample from a model's predictive distribution given a set of parameters
Source:R/data-gen.R
model_sim.Rd
Generates samples from the predictive distribution of a model given a set of parameters. This is primarily used for prior predictive checks and simulation studies.
Arguments
- dat
A
list
containing the data and prior parameters, typically generated bymake_data()
ormake_data_sdm()
.- model
A
character
string specifying the model type. Must be either "drm" or "sdm". Defaults to "drm".- selectivity
a numeric
vector
with the same length as the number of age-groups.- pars
a named
list
of model parameters.- ...
parameters passed on to
pop_dyn
.
Details
See this link for the rlang::.data import.