Usage
set_user_prior(
prior,
...,
model = c("beta_binom", "gamma_pois", "anova1"),
anova_d = 2
)Arguments
- prior
An R function returning the log of the prior density for of (perhaps a subset of) the hyperparameter vector \(\phi\).
- ...
Further arguments giving the names and values of any parameters involved in the function
prior.- model
A character string. Abbreviated name of the model: "beta_binom" for beta-binomial and "gamma_pois" for gamma-Poisson (see
hef), "anova1" for 1-way ANOVA (seehanova1).- anova_d
An integer scalar. Only relevant if
model = anova1. Ifanova_d = 2thenpriormust return the log-prior density for the standard deviations \((\sigma_\alpha, \sigma)\) and a normal prior with meanmu0and standard deviationsigma0is used for \(\mu\). The values ofmu0 = 0andsigma0 = Infare set in the call tohanova1, with default valuesmu0 = 0andsigma0 = Inf. Ifanova_d = 3thenpriormust return the log-prior density for \((\mu, \sigma_\alpha, \sigma)\).
Value
A list of class "bang_prior". Will contain the component
prior, the user-supplied function to evaluate the log of the prior,
and any arguments supplied in ....
Details
For details of the hyperparameters in \(\phi\) see the
Details section of hef for the models
beta_binom and gamma_pois and of hanova1
for the model anova1.