bounds: Get support of a prior or data distribution

Description Usage Arguments Value Examples

Description

bounds() returns the range of the support of a prior or data distribution.

Usage

1
2
3
4
5
6
7
bounds(dist, ...)

## S4 method for signature 'PointMassPrior'
bounds(dist, ...)

## S4 method for signature 'ContinuousPrior'
bounds(dist, ...)

Arguments

dist

a univariate distribution object

...

further optional arguments

Value

numeric of length two, c(lower, upper)

Examples

1
2
3
4
5
bounds(PointMassPrior(c(0, .5), c(.3, .7)))
# > 0.3 0.7

bounds(ContinuousPrior(function(x) dunif(x, .2, .4), c(.2, .4)))
# > 0.2 0.4

adoptr documentation built on June 28, 2021, 5:11 p.m.