laptolint: Laplace Tolerance Intervals

laptol.intR Documentation

Laplace Tolerance Intervals

Description

Provides 1-sided or 2-sided tolerance intervals for data distributed according to a Laplace distribution.

Usage

laptol.int(x, alpha = 0.05, P = 0.99, side = 1)

Arguments

x

A vector of data which is distributed according to a Laplace distribution.

alpha

The level chosen such that 1-alpha is the confidence level.

P

The proportion of the population to be covered by this tolerance interval.

side

Whether a 1-sided or 2-sided tolerance interval is required (determined by side = 1 or side = 2, respectively).

Value

laptol.int returns a data frame with items:

alpha

The specified significance level.

P

The proportion of the population covered by this tolerance interval.

1-sided.lower

The 1-sided lower tolerance bound. This is given only if side = 1.

1-sided.upper

The 1-sided upper tolerance bound. This is given only if side = 1.

2-sided.lower

The 2-sided lower tolerance bound. This is given only if side = 2.

2-sided.upper

The 2-sided upper tolerance bound. This is given only if side = 2.

References

Bain, L. J. and Engelhardt, M. (1973), Interval Estimation for the Two Parameter Double Exponential Distribution, Technometrics, 15, 875–887.

Examples

 
## First generate data from a Laplace distribution with location
## parameter 70 and scale parameter 3.

set.seed(100)
tmp <- runif(40)
x <- rep(70, 40) - sign(tmp - 0.5)*rep(3, 40)*
              log(2*ifelse(tmp < 0.5, tmp, 1-tmp))

## 95%/90% 1-sided Laplace tolerance intervals for the sample
## of size 40 generated above. 

out <- laptol.int(x = x, alpha = 0.05, P = 0.90, side = 1) 
out

plottol(out, x, plot.type = "hist", side = "two", 
        x.lab = "Laplace Data")

tolerance documentation built on May 29, 2024, 7:38 a.m.