K.factor.sim | R Documentation |
Estimates k-factors for simultaneous tolerance intervals based on normality.
K.factor.sim(n, l = NULL, alpha = 0.05, P = 0.99, side = 1,
method = c("EXACT", "BONF"), m = 50)
n |
If |
l |
The number of normal populations for which the k-factors will be constructed simultaneously.
If |
alpha |
The level chosen such that |
P |
The proportion of the population to be covered by the tolerance interval. |
side |
Whether a k-factor for a 1-sided or 2-sided tolerance interval is required (determined by |
method |
The method for calculating the k-factors. |
m |
The maximum number of subintervals to be used in the |
K.factor
returns the k-factor for simultaneous tolerance intervals based on normality with the arguments specified above.
For larger combinations of n
and l
when side = 2
and method = "EXACT"
, the calculation can be slow. For larger sample sizes when method = "BONF"
, there may be some accuracy issues with the 1-sided calculation since it depends on the noncentral t-distribution.
The code is primarily intended to be used for moderate values of the noncentrality parameter. It will not be highly accurate, especially in the tails, for large values.
See TDist
for further details.
Thanks to Andrew Landgraf for providing the basic code for the method = "EXACT"
procedure.
Krishnamoorthy, K. and Mathew, T. (2009), Statistical Tolerance Regions: Theory, Applications, and Computation, Wiley.
Mee, R. W. (1990), Simultaneous Tolerance Intervals for Normal Populations with Common Variance, Technometrics, 32, 83-92.
integrate
, K.factor
## Reproducing part of Table B5 from Krishnamoorthy and
## Mathew (2009).
n_sizes <- c(2:20, seq(30, 100, 10))
l_sizes <- 2:10
KM_table <- sapply(1:length(l_sizes), function(i)
sapply(1:length(n_sizes), function(j)
round(K.factor.sim(n = n_sizes[j],
l = l_sizes[i], side=1, alpha = 0.1,
P = 0.9),3)))
dimnames(KM_table) <- list(n = n_sizes, l = l_sizes)
KM_table
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.