get.intervals | R Documentation |
Get intervals (confidence/credible intervals) for the variables in a distribution
get.intervals(
dist,
type = c("equal-tailed", "highest-density")[1],
coverage = 0.95,
n.sim = 1000
)
dist |
An object of class Distribution or a subclass |
type |
Either 'equal-tailed' or 'highest-density' depending on the type of interval desired (equal-tailed is generally easier to compute) |
coverage |
A vector of probabilities (from 0 to 1) which the intervals should cover |
n.sim |
If the values are to be calculated by random sample generation, how many random samples to generate |
Note to developers: this function should not be overridden. Override do.get.equal.tailed.intervals
and do.get.highest.density.intervals
instead
If length(coverage)==1, and the distribution has one variable, returns a numeric vector with two values: the lower and upper bound of the interval. If length(coverage)==1 and the distribution has more than one variable, returns a matrix with one row for the lower bound and one row for the upper, and one column for each variable. If length(coverage)>1 and the distribution has one variable, returns a matrix with one row for the lower bound and one row for the upper bound, and one column for each value in coverage. If length(coverage)>1, and the distribution has more than one variable returns a 3-dimensional array; the first dimension has values 'lower' and 'upper'. The second dimension has one value for each variable. The third dimension has one value for each value of coverage.
get.equal.tailed.intervals
, get.highest.density.intervals
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.