prepare_prior: Prepare prior values for Stan models in baggr

View source: R/auto_prior.R

prepare_priorR Documentation

Prepare prior values for Stan models in baggr

Description

This is an internal function called by baggr. You can use it for debugging or to run modified models. It extracts and prepares priors passed by the user. Then, if any necessary priors are missing, it sets them automatically and notifies user about these automatic choices.

Usage

prepare_prior(
  prior,
  data,
  stan_data,
  model,
  pooling,
  covariates,
  quantiles = c(),
  silent = FALSE
)

Arguments

prior

prior argument passed from baggr call

data

data another argument in baggr

stan_data

list of inputs that will be used by sampler this is already pre-obtained through convert_inputs

model

same as in baggr

pooling

same as in baggr

covariates

same as in baggr

quantiles

same as in baggr

silent

same as in baggr

Value

A named list with prior values that can be appended to stan_data and passed to a Stan model.


wwiecek/baggr documentation built on April 5, 2025, 11:26 a.m.