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)1-alpha is the confidence level.side = 1 or side = 2,
respectively)."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.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".TRUE, then the data is considered to be from a log-gamma distribution, in which
case the output gives tolerance intervals for the log-gamma distribution. The default is FALSE.gamtol.int returns a data frame with items:
side = 1.side = 1.side = 2.side = 2.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,
method = "HE")
out
plottol(out, x, plot.type = "both", side = "upper",
x.lab = "Gamma Data")
Run the code above in your browser using DataLab