Skip to contents

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.

Usage

model_sim(dat, model, selectivity, pars, ...)

Arguments

dat

A list containing the data and prior parameters, typically generated by make_data() or make_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.

Value

A list containing samples drawn from the prior distributions of the model parameters.

Details

See this link for the rlang::.data import.

See also

Author

lcgodoy