add_distribution() returns a copy of a registry with a new generator
added; reset_distributions() returns the built-in registry;
get_prior_distribution() draws from a named generator in a registry.
Usage
add_distribution(distributions, name, func)
reset_distributions()
get_prior_distribution(
dist_type,
params,
distributions = original_distributions
)Arguments
- distributions
A named list of generator functions, such as original_distributions.
- name
Name for the new generator.
- func
A function whose first argument is the number of draws.
- dist_type
Name of the generator to use.
- params
A named list of arguments passed to the generator, including
sample_size.
Value
add_distribution() and reset_distributions() return a named
list of functions; get_prior_distribution() returns the draws.