prior-class | R Documentation |
This class encapsulates the structure of prior distributions used in hierarchical Bayesian modelling. It stores both subject-level and population-level (hyperparameter) priors for a model’s parameters, and is used in Bayesian inference workflows, particularly with models from the lbaModel or ddModel packages.
An S4 object of class "prior"
, used in computing prior
densities and visualising prior distributions.
nparameter
Integer. Number of free parameters in the model.
pnames
Character vector. Names of the free parameters.
p_prior
List. Represents the joint prior distribution at the subject level, usually constructed from standard or truncated distributions.
h_prior
List. Representing the joint prior at the population level, typically containing location and scale parameters for hierarchical models. The 'h' prefix refers to hyperparameters.
An object of class "prior"
contains the following components:
nparameter
Number of free parameters.
pnames
Names of the model's free parameters.
p_prior
Subject-level prior specification. Conceptually analogous to the model likelihood in a hierarchical Bayesian model.
h_prior
Hyperparameter-level (group-level) prior specification.
Used to define priors for hierarchical Bayesian cognitive models. This
class allows structured specification of priors at both individual and
group levels. Prior objects are commonly constructed using
set_priors
, which integrates multiple BuildPrior
outputs into a single prior structure.
BuildPrior
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.