Extracts summarised parameter posteriors from a
stanfit object using
rstan::summary in a format consistent with other summary functions in
EpiNow2.
extract_stan_param(
fit,
params = NULL,
CrIs = c(0.2, 0.5, 0.9),
var_names = FALSE
)A data.table summarising parameter posteriors. Contains a
following variables: variable, mean, mean_se, sd, median, and
lower_, upper_ followed by credible interval labels indicating the
credible intervals present.
A stanfit objec.
A character vector of parameters to extract. Defaults to all parameters.
Numeric vector of credible intervals to calculate.
Logical defaults to FALSE. Should variables be named.
Automatically set to TRUE if multiple parameters are to be extracted.
Sam Abbott