powered by
Adds symmetric a credible interval based on quantiles.
calc_CrI(samples, summarise_by = NULL, CrI = 0.9)
A data.table containing the upper and lower bounds for the specified credible interval.
A data.table containing at least a value variable
A character vector of variables to group by.
Numeric between 0 and 1. The credible interval for which to return values. Defaults to 0.9.
samples <- data.frame(value = 1:10, type = "car") # add 90% credible interval calc_CrI(samples) # add 90% credible interval grouped by type calc_CrI(samples, summarise_by = "type")
Run the code above in your browser using DataLab