fidnegbintol.int | R Documentation |
Provides 1-sided or 2-sided tolerance intervals for the function of two negative binomial proportions using fiducial quantities.
fidnegbintol.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 "failures" from group 1. |
x2 |
A value of observed "failures" from group 2. |
n1 |
The target number of successes for group 1. |
n2 |
The target number of successes 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 NegBin(n,p)
distribution, then the fiducial quantity for p
is Beta(n,X+0.5)
.
fidnegbintol.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
.
Cai, Y. and Krishnamoorthy, K. (2005), A Simple Improved Inferential Method for Some Discrete Distributions, Computational Statistics and Data Analysis, 48, 605–621.
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.
fidbintol.int
, fidpoistol.int
## 95%/99% 1-sided and 2-sided tolerance intervals for
## the ratio of odds ratios for negative binomial proportions.
set.seed(100)
p1 <- 0.6
p2 <- 0.2
n1 <- n2 <- 50
x1 <- rnbinom(1, n1, p1)
x2 <- rnbinom(1, n2, p2)
fun.ti <- function(x, y) x * (1 - y) / (y * (1 - x))
fidnegbintol.int(x1, x2, n1, n2, m1 = 50, m2 = 50, FUN = fun.ti,
alpha = 0.05, P = 0.99, side = 1)
fidnegbintol.int(x1, x2, n1, n2, m1 = 50, m2 = 50, 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.