set.prior: Set the parameters of the prior distributions

View source: R/set.prior.R

set.priorR Documentation

Set the parameters of the prior distributions

Description

Set the parameters of the prior distributions

Usage

set.prior(model, ...)

Arguments

model

a bhsdtr model object

...

There are two ways of providing the values of the prior parameters. One is by directly using the names of the prior parameters, e.g., delta_prior_fixed_mu = log(1.5), delta_prior_fixed_sd = 2. Note that with the exception of nu (lkj prior), the prior parameters are internally represented as matrices of dimension DxC, where D is the dimensionality of the parameter (delta has 2 in the meta-d' and the dpsdt with correlated d' and R random effects models, otherwise it has 1, theta has 1, eta has 1, gamma has K - 1, unless the twoparameter or the parsimonious link function is used, in which case it has dim = 2) and C is the number of columns in the fixed (<par>_prior_fixed_mu, <par>_prior_fixed_sd) or the random (<par>prior_scale_<g>) effects' model matrix. You can provide scalars, vectors, or matrices. A vector will fill the prior parameter matrix in column major order. A more convenient way is to use arguments of the form: delta = list(mu = log(2), sd = 4, scale = list('1' = 6), nu = list('1' = 1000), etc.

Value

a bhsdtr model object with updated priors


boryspaulewicz/bhsdtr2 documentation built on July 17, 2024, 8:22 p.m.