get_prior  R Documentation 
Get information on all parameters (and parameter classes) for which priors may be specified including default priors.
get_prior(
formula,
data,
family = gaussian(),
autocor = NULL,
data2 = NULL,
knots = NULL,
drop_unused_levels = TRUE,
sparse = NULL,
...
)
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 
autocor 
(Deprecated) An optional 
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 
sparse 
(Deprecated) Logical; indicates whether the populationlevel
design matrices should be treated as sparse (defaults to 
... 
Other arguments for internal usage only. 
A data.frame with columns prior
, class
, coef
,
and group
and several rows, each providing information on a
parameter (or parameter class) on which priors can be specified. The prior
column is empty except for internal default priors.
set_prior
## get all parameters and parameters classes to define priors on
(prior < get_prior(count ~ zAge + zBase * Trt + (1patient) + (1obs),
data = epilepsy, family = poisson()))
## define a prior on all populationlevel effects a once
prior$prior[1] < "normal(0,10)"
## define a specific prior on the populationlevel effect of Trt
prior$prior[5] < "student_t(10, 0, 5)"
## verify that the priors indeed found their way into Stan's model code
make_stancode(count ~ zAge + zBase * Trt + (1patient) + (1obs),
data = epilepsy, family = poisson(),
prior = prior)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.