Skip to contents

A prior's par1/par2 are recycled across every element of the parameter it indexes. Recycling is silent, so a hyperparameter vector that is neither scalar nor the same length as the parameter quietly assigns the wrong hyperparameter to some elements. Call this after get_priors (and after any hand-editing of the returned list) to catch that.

Usage

check_priors(priors, parameters)

Arguments

priors

A list of prior specifications, typically from get_priors.

parameters

A list containing the model parameters.

Value

Invisibly TRUE. Stops with an error listing every offending prior.

Details

Note that a prior is applied to every element of its parameter, not to every unique level of that parameter's map. Where a map ties elements together, the prior is therefore counted once per tied element, which tightens it by a factor of sqrt(number of tied elements).