gamtol.int | R Documentation |
Provides 1-sided or 2-sided tolerance intervals for data distributed according to either a gamma distribution or log-gamma distribution.
gamtol.int(x, alpha = 0.05, P = 0.99, side = 1,
method = c("HE", "HE2", "WBE", "ELL", "KM", "EXACT",
"OCT"), m = 50, log.gamma = FALSE)
x |
A vector of data which is distributed according to either a gamma distribution or a log-gamma distribution. |
alpha |
The level chosen such that |
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 |
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. |
m |
The maximum number of subintervals to be used in the |
log.gamma |
If |
Recall that if the random variable X
is distributed according to a log-gamma distribution, then the random variable Y = ln(X)
is
distributed according to a gamma distribution.
gamtol.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 |
1-sided.upper |
The 1-sided upper tolerance bound. This is given only if |
2-sided.lower |
The 2-sided lower tolerance bound. This is given only if |
2-sided.upper |
The 2-sided upper tolerance bound. This is given only if |
Krishnamoorthy, K., Mathew, T., and Mukherjee, S. (2008), Normal-Based Methods for a Gamma Distribution: Prediction and Tolerance Intervals and Stress-Strength Reliability, Technometrics, 50, 69–78.
GammaDist
, K.factor
## 99%/99% 1-sided gamma tolerance intervals for a sample
## of size 50.
set.seed(100)
x <- rgamma(50, 0.30, scale = 2)
out <- gamtol.int(x = x, alpha = 0.01, P = 0.99, side = 1)
out
plottol(out, x, plot.type = "both", side = "upper",
x.lab = "Gamma Data")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.