[Stable]

Used to extract a specified prediction interval at a particular confidence level from a distribution.

The numeric lower and upper bounds can be extracted from the interval using <hilo>$lower and <hilo>$upper as shown in the examples below.

hilo(x, ...)

Arguments

x

Object to create hilo from.

...

Additional arguments used by methods.

Examples

# 95% interval from a standard normal distribution
interval <- hilo(dist_normal(0, 1), 95)
interval
#> <hilo[1]>
#> [1] [-1.959964, 1.959964]95

# Extract the individual quantities with `$lower`, `$upper`, and `$level`
interval$lower
#> [1] -1.959964
interval$upper
#> [1] 1.959964
interval$level
#> [1] 95