ciss.liubailey(alpha, d, lambda.grid = 0:30)
Given d
, fixed lambda
and a sample size n
, the
proportion $p$ in [0,1] where the coverage probability is minimum
is computed. The sample size is then gradually increased until this
minimum coverage probability becomes larger than $1-\alpha$. We
then change the value of $\lambda$, and search the minimum sample
size that guarantee the $1-\alpha$ confidence level for this
lambda value. The smallest minimum sample size over a set of lambda
values in lambda.grid
is then used as the required sample size;
this sample size and the corresponding lambda value are used to
calculate the confidence interval given above.
For a general overview of coverage probabilities of confidence
intervals for a binomial proportion see Agresti and Coull (1998). Once
actual binomial data are obtained the function
binom.liubailey
can be used to compute the actual
confidence interval.
The R function code calls the original Fortran code developed for the
Liu and Bailey (2002) article. NAG calls were replaced by R API calls
and an R wrapper calling the code as subroutine was created.
binom.liubailey
ciss.liubailey(alpha=0.1,d=0.05)
ciss.liubailey(alpha=0.1,d=0.05,lambda.grid=5)
Run the code above in your browser using DataLab