rbeta_within: Beta distribution within a defined tolerance interval

Description Usage Arguments Details Value Examples

View source: R/beta.r

Description

Returns a beta-distributed vector within the tolerance interval defined by lower and upper.

Usage

1
rbeta_within(n, mode, lower, upper, confidence_level = 0.9, sigma = NA)

Arguments

n

(required) integer. The number of random numbers to generate.

mode

(required) numeric. The mode, or most likely value, of the returned distribution.

lower

(required) numeric. The lower (1 - confidence_level)/2 tolerance limit.

upper

(required) numeric. The upper (1 + confidence_level)/2 tolerance limit.

confidence_level

(optional) numeric. The confidence level at which interval lower, upper is obtained. To specify sigmas instead, set conf.level = NA.

sigma

(optional) numeric. If confidence_level = NA, the number of standard deviations between lower and upper.

Details

conf.level indicates the confidence level of the interval [lower, upper]. For example, a high-confidence estimate might be 0.9973, or six standard deviations between lower and upper.

Value

numeric vector with n elements randomly distributed so that approximately confidence_level * 100 percent of values will fall between lower and upper. If an error occurs, will usually return NULL and print an error message.

Examples

1
2
3
rbeta_within(10, 5, 3, 10)
rbeta_within(10, 5, 3, 10, 0.99)
summary(rbeta_within(1000, 5, 3, 10))

tomhopper/randr documentation built on Nov. 8, 2021, 2:01 p.m.