prior_factor | R Documentation |
prior_factor
creates a prior distribution for fitting
models with factor predictors. (Note that results across different operating
systems might vary due to differences in JAGS numerical precision.)
prior_factor(
distribution,
parameters,
truncation = list(lower = -Inf, upper = Inf),
prior_weights = 1,
contrast = "meandif"
)
distribution |
name of the prior distribution. The possible options are
|
parameters |
list of appropriate parameters for a given
|
truncation |
list with two elements, |
prior_weights |
prior odds associated with a given distribution. The value is passed into the model fitting function, which creates models corresponding to all combinations of prior distributions for each of the model parameters and sets the model priors odds to the product of its prior distributions. |
contrast |
type of contrast for the prior distribution. The possible options are
|
return an object of class 'prior'.
prior()
# create an orthonormal prior distribution
p1 <- prior_factor(distribution = "mnormal", contrast = "orthonormal",
parameters = list(mean = 0, sd = 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.