Uses the complementary log (cloglog) parameterization on the observed proportion to construct confidence intervals.

binom.cloglog(x, n, conf.level = 0.95, ...)

Arguments

x

Vector of number of successes in the binomial experiment.

n

Vector of number of independent trials in the binomial experiment.

conf.level

The level of confidence to be used in the confidence interval.

...

ignored

Details

For derivations see doc/binom.pdf.

Value

A data.frame containing the observed proportions and the lower and upper bounds of the confidence interval.

Author

Sundar Dorai-Raj (sdorairaj@gmail.com)

Examples

binom.cloglog(x = 0:10, n = 10)
#>     method  x  n mean       lower     upper
#> 1  cloglog  0 10  0.0 0.000000000 0.3084971
#> 2  cloglog  1 10  0.1 0.005723456 0.3581275
#> 3  cloglog  2 10  0.2 0.030909024 0.4747147
#> 4  cloglog  3 10  0.3 0.071134492 0.5778673
#> 5  cloglog  4 10  0.4 0.122693166 0.6702046
#> 6  cloglog  5 10  0.5 0.183605591 0.7531741
#> 7  cloglog  6 10  0.6 0.252668897 0.8272210
#> 8  cloglog  7 10  0.7 0.328716593 0.8919490
#> 9  cloglog  8 10  0.8 0.408690782 0.9458726
#> 10 cloglog  9 10  0.9 0.473009271 0.9852814
#> 11 cloglog 10 10  1.0 0.691502892 1.0000000