fidbintol.int | R Documentation |
Provides 1-sided or 2-sided tolerance intervals for the function of two binomial proportions using fiducial quantities.
fidbintol.int(x1, x2, n1, n2, m1 = NULL, m2 = NULL, FUN,
alpha = 0.05, P = 0.99, side = 1, K = 1000,
B = 1000)
x1 |
A value of observed "successes" from group 1. |
x2 |
A value of observed "successes" from group 2. |
n1 |
The total number of trials for group 1. |
n2 |
The total number of trials for group 2. |
m1 |
The total number of future trials for group 1. If |
m2 |
The total number of future trials for group 2. If |
FUN |
Any reasonable (and meaningful) function taking exactly two arguments that we are interested in constructing a tolerance interval on. |
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 |
K |
The number of fiducial quantities to be generated. The number of iterations should be at least as large as the default value of 1000. See |
B |
The number of iterations used for the Monte Carlo algorithm which determines the tolerance limits. The number of iterations should be at least as large as the default value of 1000. |
If X
is observed from a Bin(n,p)
distribution, then the fiducial quantity for p
is Beta(X+0.5,n-X+0.5)
.
fidbintol.int
returns a list with two items. The first item (tol.limits
) is a data frame with the following items:
alpha |
The specified significance level. |
P |
The proportion of the population covered by this tolerance interval. |
fn.est |
A point estimate of the functional form of interest using the maximum likelihood estimates calculated with the inputted values of |
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 |
The second item (fn
) simply returns the functional form specified by FUN
.
Clopper, C. J. and Pearson, E. S. (1934), The Use of Confidence or Fiducial Limits Illustrated in the Case of the Binomial, Biometrika, 26, 404–413.
Krishnamoorthy, K. and Lee, M. (2010), Inference for Functions of Parameters in Discrete Distributions Based on Fiducial Approach: Binomial and Poisson Cases, Journal of Statistical Planning and Inference, 140, 1182–1192.
Mathew, T. and Young, D. S. (2013), Fiducial-Based Tolerance Intervals for Some Discrete Distributions, Computational Statistics and Data Analysis, 61, 38–49.
fidnegbintol.int
, fidpoistol.int
## 95%/99% 1-sided and 2-sided tolerance intervals for
## the difference between binomial proportions.
set.seed(100)
p1 <- 0.2
p2 <- 0.4
n1 <- n2 <- 200
x1 <- rbinom(1, n1, p1)
x2 <- rbinom(1, n2, p2)
fun.ti <- function(x, y) x - y
fidbintol.int(x1, x2, n1, n2, m1 = 500, m2 = 500, FUN = fun.ti,
alpha = 0.05, P = 0.99, side = 1)
fidbintol.int(x1, x2, n1, n2, m1 = 500, m2 = 500, FUN = fun.ti,
alpha = 0.05, P = 0.99, side = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.