Given a vector of MCMC samples, generates and formats the desired quantile estimates

generate_quantiles(x, sig_f = 3, qs = c(0.025, 0.5, 0.975), as_text = TRUE)

Arguments

x

the vector to summarise

sig_f

how many significant figures to print

qs

the vector of quantiles

as_text

if TRUE, formats nicely as text rather than a vector of numbers

Value

the formatted quantiles

Examples

data(example_theta_chain) x <- example_theta_chain$mu generate_quantiles(x)
#> [1] "1.78 (1.67-1.9)"