bayesnormtol.int | R Documentation |
Provides 1-sided or 2-sided Bayesian tolerance intervals under the conjugate prior for data distributed according to a normal distribution.
bayesnormtol.int(x = NULL, norm.stats = list(x.bar = NA,
s = NA, n = NA), alpha = 0.05, P = 0.99,
side = 1, method = c("HE", "HE2", "WBE",
"ELL", "KM", "EXACT", "OCT"), m = 50,
hyper.par = list(mu.0 = NULL,
sig2.0 = NULL, m.0 = NULL, n.0 = NULL))
x |
A vector of data which is distributed according to a normal distribution. |
norm.stats |
An optional list of statistics that can be provided in-lieu of the full dataset. If provided, the user must specify all three components: the sample mean ( |
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 |
hyper.par |
A list consisting of the hyperparameters for the conjugate prior: the hyperparameters for the mean ( |
Note that if one considers the non-informative prior distribution, then the Bayesian tolerance intervals are the same as the classical solution, which can be obtained by using normtol.int
.
bayesnormtol.int
returns a data frame with items:
alpha |
The specified significance level. |
P |
The proportion of the population covered by this tolerance interval. |
x.bar |
The sample mean. |
1-sided.lower |
The 1-sided lower Bayesian tolerance bound. This is given only if |
1-sided.upper |
The 1-sided upper Bayesian tolerance bound. This is given only if |
2-sided.lower |
The 2-sided lower Bayesian tolerance bound. This is given only if |
2-sided.upper |
The 2-sided upper Bayesian tolerance bound. This is given only if |
Aitchison, J. (1964), Bayesian Tolerance Regions, Journal of the Royal Statistical Society, Series B, 26, 161–175.
Guttman, I. (1970), Statistical Tolerance Regions: Classical and Bayesian, Charles Griffin and Company.
Young, D. S., Gordon, C. M., Zhu, S., and Olin, B. D. (2016), Sample Size Determination Strategies for Normal Tolerance Intervals Using Historical Data, Quality Engineering, 28, 337–351.
Normal
, normtol.int
, K.factor
## 95%/85% 2-sided Bayesian normal tolerance limits for
## a sample of size 100.
set.seed(100)
x <- rnorm(100)
out <- bayesnormtol.int(x = x, alpha = 0.05, P = 0.85,
side = 2, method = "EXACT",
hyper.par = list(mu.0 = 0,
sig2.0 = 1, n.0 = 10, m.0 = 10))
out
plottol(out, x, plot.type = "both", side = "upper",
x.lab = "Normal Data")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.