validate_prior | R Documentation |
Validate priors supplied by the user. Return a complete set of priors for the given model, including default priors.
validate_prior(
prior,
formula,
data,
family = gaussian(),
sample_prior = "no",
data2 = NULL,
knots = NULL,
drop_unused_levels = TRUE,
...
)
prior |
One or more |
formula |
An object of class |
data |
An object of class |
family |
A description of the response distribution and link function to
be used in the model. This can be a family function, a call to a family
function or a character string naming the family. Every family function has
a |
sample_prior |
Indicate if draws from priors should be drawn
additionally to the posterior draws. Options are |
data2 |
A named |
knots |
Optional list containing user specified knot values to be used
for basis construction of smoothing terms. See
|
drop_unused_levels |
Should unused factors levels in the data be
dropped? Defaults to |
... |
Other arguments for internal usage only. |
An object of class brmsprior
.
default_prior
, set_prior
.
prior1 <- prior(normal(0,10), class = b) +
prior(cauchy(0,2), class = sd)
validate_prior(prior1, count ~ zAge + zBase * Trt + (1|patient),
data = epilepsy, family = poisson())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.