mvtolregion: Multivariate Normal Tolerance Regions

mvtol.regionR Documentation

Multivariate Normal Tolerance Regions

Description

Determines the appropriate tolerance factor for computing multivariate normal tolerance regions based on Monte Carlo methods or other approximations.

Usage

mvtol.region(x, alpha = 0.05, P = 0.99, B = 1000, M = 1000,
             method = c("KM", "AM", "GM", "HM", "MHM", "V11", 
             "HM.V11", "MC")) 

Arguments

x

An nxp matrix of data assumed to be drawn from a p-dimensional multivariate normal distribution. n pertains to the sample size.

alpha

The level chosen such that 1-alpha is the confidence level. A vector of alpha values may be specified.

P

The proportion of the population to be covered by this tolerance region. A vector of P values may be specified.

B

The number of iterations used for the Monte Carlo algorithms (i.e., when method = "KM" or "MC"), which determines the tolerance factor. The number of iterations should be at least as large as the default value of 1000.

M

The number of iterations used for the inner loop of the Monte Carlo algorithm specified through method = "MC". The number of iterations should be at least as large as the default value of 1000. Note that this is not required for method = "KM" since that algorithm handles the eigenvalues differently in the estimation of the tolerance factor.

method

The method for estimating the tolerance factors. "KM" is the Krishnamoorthy-Mondal method, which is the method implemented in previous versions of the tolerance package. It is one of the more accurate methods available. "AM" is an approximation method based on the arithmetic mean. "GM" is an approximation method based on the geometric mean. "HM" is an approximation method based on the harmonic mean. "MHM" is a modified approach based on the harmonic mean. "V11" is a method that utilizes a certain partitioning of a Wishart random matrix for deriving an approximate tolerance factor. "HM.V11" is a hybrid method of the "HM" and "V11" methods. "MC" is a simple Monte Carlo approach to estimating the tolerance factor, which is computationally expensive as the values of B and M increase.

Details

All of the methods are outlined in the references that we provided. In practice, we recommend using the Krishnamoorthy-Mondal approach. A basic sketch of how the Krishnamoorthy-Mondal algorithm works is as follows:

(1) Generate independent chi-square random variables and Wishart random matrices.

(2) Compute the eigenvalues of the randomly generated Wishart matrices.

(3) Iterate the above steps to generate a set of B sample values such that the 100(1-alpha)-th percentile is an approximate tolerance factor.

Value

mvtol.region returns a matrix where the rows pertain to each confidence level 1-alpha specified and the columns pertain to each proportion level P specified.

References

Krishnamoorthy, K. and Mathew, T. (1999), Comparison of Approximation Methods for Computing Tolerance Factors for a Multivariate Normal Population, Technometrics, 41, 234–249.

Krishnamoorthy, K. and Mondal, S. (2006), Improved Tolerance Factors for Multivariate Normal Distributions, Communications in Statistics - Simulation and Computation, 35, 461–478.

Examples

 
## 90%/90% bivariate normal tolerance region. 

set.seed(100)
x1 <- rnorm(100, 0, 0.2)
x2 <- rnorm(100, 0, 0.5)
x <- cbind(x1, x2)

out1 <- mvtol.region(x = x, alpha = 0.10, P = 0.90, B = 1000,
                     method = "KM")
out1
plottol(out1, x)

## 90%/90% trivariate normal tolerance region. 

set.seed(100)
x1 <- rnorm(100, 0, 0.2)
x2 <- rnorm(100, 0, 0.5)
x3 <- rnorm(100, 5, 1)
x <- cbind(x1, x2, x3)
mvtol.region(x = x, alpha = c(0.10, 0.05, 0.01), 
             P = c(0.90, 0.95, 0.99), B = 1000, method = "KM") 

out2 <- mvtol.region(x = x, alpha = 0.10, P = 0.90, B = 1000, 
                     method = "KM")
out2
plottol(out2, x)

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