anovatolint: Tolerance Intervals for ANOVA

Description Usage Arguments Value References See Also Examples

Description

Tolerance intervals for each factor level in a balanced (or nearly-balanced) ANOVA.

Usage

1
2
3
anovatol.int(lm.out, data, alpha = 0.05, P = 0.99, side = 1,
             method = c("HE", "HE2", "WBE", "ELL", "KM", 
             "EXACT", "OCT"), m = 50)

Arguments

lm.out

An object of class lm (i.e., the results from the linear model fitting routine such that the anova function can act upon).

data

A data frame consisting of the data fitted in lm.out. Note that data must have one column for each main effect (i.e., factor) that is analyzed in lm.out and that these columns must be of class factor.

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).

method

The method for calculating the k-factors. The k-factor for the 1-sided tolerance intervals is performed exactly and thus is the same for the chosen method. "HE" is the Howe method and is often viewed as being extremely accurate, even for small sample sizes. "HE2" is a second method due to Howe, which performs similarly to the Weissberg-Beatty method, but is computationally simpler. "WBE" is the Weissberg-Beatty method (also called the Wald-Wolfowitz method), which performs similarly to the first Howe method for larger sample sizes. "ELL" is the Ellison correction to the Weissberg-Beatty method when f is appreciably larger than n^2. A warning message is displayed if f is not larger than n^2. "KM" is the Krishnamoorthy-Mathew approximation to the exact solution, which works well for larger sample sizes. "EXACT" computes the k-factor exactly by finding the integral solution to the problem via the integrate function. Note the computation time of this method is largely determined by m. "OCT" is the Owen approach to compute the k-factor when controlling the tails so that there is not more than (1-P)/2 of the data in each tail of the distribution.

m

The maximum number of subintervals to be used in the integrate function. This is necessary only for method = "EXACT" and method = "OCT". The larger the number, the more accurate the solution. Too low of a value can result in an error. A large value can also cause the function to be slow for method = "EXACT".

Value

anovatol.int returns a list where each element is a data frame corresponding to each main effect (i.e., factor) tested in the ANOVA and the rows of each data frame are the levels of that factor. The columns of each data frame report the following:

mean

The mean for that factor level.

n

The effective sample size for that factor level.

k

The k-factor for constructing the respective factor level's 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

Howe, W. G. (1969), Two-Sided Tolerance Limits for Normal Populations - Some Improvements, Journal of the American Statistical Association, 64, 610–620.

Weissberg, A. and Beatty, G. (1969), Tables of Tolerance Limit Factors for Normal Distributions, Technometrics, 2, 483–500.

See Also

K.factor, normtol.int, lm, anova

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 
## 90%/95% 2-sided tolerance intervals for a 2-way ANOVA 
## using the "warpbreaks" data.

attach(warpbreaks)

lm.out <- lm(breaks ~ wool + tension)
out <- anovatol.int(lm.out, data = warpbreaks, alpha = 0.10,
                    P = 0.95, side = 2, method = "HE")
out

plottol(out, x = warpbreaks)

tolerance documentation built on May 2, 2019, 4:01 a.m.