View source: R/user_get_medians.R
| get_medians | R Documentation |
get_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.
get_medians(sample)
get_credible_interval(sample, perc_ci = 0.95)
get_relative_precision(medians, ci)
sample |
array of samples generated by |
perc_ci |
Number from 0 to 1. Determines width of credible interval. |
medians |
Array of medians generated from samples. |
ci |
Credible interval generated by |
An array of estimates/credible intervals/relative precisions.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.