Description Usage Arguments Value Examples
Assign Prior Distributions to Parameters
1 | assign_prior(param, prior, dpar, level = NULL)
|
param |
character string. Which parameter (e.g., |
prior |
character string. The desired prior distribution, following the JAGS formulation with the precision and not variance for the scale. See Details. |
dpar |
character string. Which distributional parameter? The options
include |
level |
character string. The level when |
A list that is used internally.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(psymetadata)
prior <- c(assign_prior(param = "(Intercept)",
prior = "dnorm(0, 1)", dpar = "location"),
assign_prior(param = "(Intercept)",
prior = "dnorm(-2, 1)",
dpar = "scale", level = "two")
)
priors <- make_prior(yi = yi,
vi = vi,
prior = prior,
es_id = es_id,
study_id = study_id,
data = gnambs2020)
priors
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.