fortify_priors: Fortify a list of priors

Description Usage Arguments Value

View source: R/01-model-setup.R

Description

This function takes a list of priors, validates them using validate_prior_distribution(), and stacks them together into one function that takes a vector argument, representing the joint prior on all hyperparameters. This enforces prior independence between hyperparameters.

The user shouldn't have to use this function; it is exported in case advanced users want to define their own priors.

Usage

1
fortify_priors(priorlist)

Arguments

priorlist

A list of priors, each as created by e.g. pc_prior() or in the same format. Its elements will be passed to validate_prior_distribution().

Value

A function which computes the joint log-prior of all hyperparameters, assuming prior independence.


awstringer1/casecrossover documentation built on March 11, 2021, 4:41 a.m.