Priors¶
-
class
brmp.priors.Prior(path, prior)¶ A
Priorinstance associates a prior distribution with one or more parameters of a model. One or more such instances may be passed tobrm()to override its default choice of priors.The parameters of the model to which a prior should be applied are specified using a path. The following examples illustrate how this works:
Path Selected Parameters ('b',)All population level coefficients ('b', 'intercept')The population level intercept ('b', 'x')The population level coefficient x('sd',)All standard deviations in all groups ('sd', 'a')All standard deviations in the group which groups by column a('sd', 'a:b')All standard deviations in the group which groups by columns aandb('sd', 'a', 'intercept')The standard deviation of the intercept in the group which groups by column a('cor',)All correlation matrices ('cor', 'a')The correlation matrix of the group which groups by column a('cor', 'a:b')The correlation matrix of the group which groups by columns aandb('resp', `sigma`)The sigmaparameter of the response distributionExample:
Prior(('b', 'intercept'), Normal(0., 1.))
Parameters: - path (tuple) – A path describing one or more parameters of the model.
- prior (brmp.family.Family) – A prior distribution, given as a
Familywith all of its parameters specified.