data.frame to list
Converts priors defined in a
data.frame into a list
format for use by stan. In addition it adds "_p" to all
variable names in order too allow them to be distinguished from
their standard usage within modelling code.
data.framewith the following variables:
sddescribing normal priors. Priors in the appropriate format are returned by
enw_reference()as well as by other similar model specification functions.
A named list with each entry specifying a prior as a length two vector (specifying the mean and standard deviation of the prior).
priors <- data.frame(variable = "x", mean = 1, sd = 2) enw_priors_as_data_list(priors) #> $x_p #> [,1] #> mean 1 #> sd 2 #>