Description Usage Arguments Details Value
View source: R/init_single_chain.R
This function it a bit complicated. It reads in the prior_file
, and
parses both (1) the prior distribution for a parameter, and (2) the value(s)
which describe that distribution. From that information, it creates for each
parameter an rlang
expression of the appropriate R distribution
function (rnorm
, runif
, etc.) that will generate a single random
starting value from the prior. Finally, it assembles the expressions for each
parameter into a a single list using only the parameters needed for the
chosen model as specified by the tails
argument. That single list will
eventually be evaluated by the prep_init_list function to create the
list of initial values for Stan.
1 2 | init_single_chain(prior_file, tails = c("none", "left", "right",
"mirror", "ind"))
|
prior_file |
Path to the yaml file containing the prior specifications. |
tails |
Which type of tails for the model: "none", "left", "right", "mirror", or "ind"? |
Currently supported distributions are: normal, uniform, exponential.
Used internally, in prep_init_list.
An rlang
expression of the initialization values for a single chain
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.