Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

prepare_prior

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.


baggr

Bayesian Aggregate Treatment Effects

v0.4.0
GPL (>= 3)
Authors
Witold Wiecek [cre, aut], Rachael Meager [aut], Brice Green [ctb] (predict(), loo_compare, many visuals), Trustees of Columbia University [cph] (tools/make_cc.R)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.