| xtr_ci | R Documentation |
Calculates Bayesian credible intervals (CI) using one of the available methods:
"HDI": highest density interval (see xtr_ci_hdi()),
"ETI": equal tailed intervals (see xtr_ci_eti()).
xtr_ci(x, level = 0.95, ..., type = "HDI", na_rm = FALSE)
x |
A numeric vector of MCMC samples. |
level |
A number > 0 and <= 1 specifying the probability coverage of the interval. |
... |
Currently unused. |
type |
A string indicating which type of CI to return.
Currently allows Highest Density Intervals ( |
na_rm |
A flag indicating whether to remove missing values. |
A data.frame of the lower and upper limits for the credible interval.
Note that the interval is not guaranteed to be one-sided or two-sided.
mcmcr::coef
xtr_ci(rnorm(1e4), type = "HDI")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.