
Generate medians, credible intervals, and relative precisions
get_medians.Rdget_medians() generates median estimates for array of samples loaded from load_samples().
get_credible_interval() generates the credible interval of each estimate using samples loaded from load_samples().
get_relative_precision() generates the relative precision of each estimate using samples loaded from load_samples(). The relative precision for an estimate is defined as the ratio of the estimate's median divided by the width of its credible interval.
Usage
get_medians(sample)
get_credible_interval(sample, perc_ci = 0.95)
get_relative_precision(medians, ci)Examples
minmedians <- get_medians(minsample)
minci <- get_credible_interval(minsample)
# Reducing perc_ci narrows the credible interval
minci_75 <- get_credible_interval(minsample, perc_ci = 0.75)
# low relative precision due to small data size
minrp <- get_relative_precision(minmedians, minci)
# reducing CI increases relative precision
minrp_75 <- get_relative_precision(minmedians, minci_75)
# find estimates with low relative precision
low_rp <- minrp_75 < 1