natural.tolerance: Natural Tolerance

Description Usage Arguments Value

View source: R/natural.tolerance.R

Description

Calculates the natural tolerance of a given probability distribution, defined as F(p.upper)-F(p.lower) where F is a quantile function for a given univariate distribution. Default is to calculate the natural tolerance with a total tail area of .0027, or .00135 on the lower tail and .00135 on the upper tail.

Usage

1
2
3
4
5
6
7
natural.tolerance(
  f,
  total.area = 1 - 0.9973,
  upper.tail = total.area/2,
  lower.tail = total.area/2,
  details = T
)

Arguments

f

Function - f(p, lower.tail) is a quantile function for the probability distribution in question. For example, qnorm.

total.area

Scalar/numeric - the total area to use for the calculation, default is .0027

upper.tail

Scalar/numeric - upper tail area to use for the calculation, default is .00135

lower.tail

Scalar/numeric - lower tail area to use for the calculation, default is .00135

details

Scalar/logical - Include calculation details, default is to return details

Value

Scalar or data.frame - scalar if details = F, otherwise data frame with details from calculation.


burrm/lolcat documentation built on Oct. 13, 2021, 11:35 p.m.