Skip to contents

Extract and summarise posteriors from a epict() to use as priors (based on the distributions given in epict_priors()) assuming they are independent normal

Usage

epict_posterior_as_prior(
  fit,
  priors = epict::epict_priors(),
  variables = c(),
  sub = "_int",
  scale = 5
)

Arguments

fit

A cmdstanr fit as returned by epict().

priors

A data frame of priors to update as defined in epict_priors().

variables

A character vector of variables both in the posterior and in the default priors.

sub

A character string indicating the part of variable names in the posterior to remove. This can be used to link variable names in the model object to those expected as input.

scale

Numeric, defaults to 5. Amount to scale posterior standard deviations by.

Value

A data frame of priors

Author

Sam Abbott