[R] Hmisc binconf function value interpretation during narrow confidence intervals

Folkes, Michael Michael.Folkes at dfo-mpo.gc.ca
Mon Sep 9 21:35:14 CEST 2013


Hello all,
I've been using binconf (package Hmisc) at a range of alpha values and
noticed that using the 'Wilson' method when alpha is larger (i.e. narrow
CI), results in the upper value being smaller than the lower value. The
'exact' and 'asymptotic' methods give results in the realm I'd expect.
But the help file suggests:
"Following Agresti and Coull, the Wilson interval is to be preferred and
so is the default."

Suggestions and clarifications gratefully received.

The following code shows the curious results:

#calc 5% CI's.
require(Hmisc)
alpha <-.95
bin.prob <- binconf(1, 100, alpha=alpha,method='all')
colnames(bin.prob)[-1] <- paste('p',c(alpha/2,1-alpha/2),sep='')
bin.prob

______________________________________
Michael Folkes
Salmon Stock Assessment
Canadian Dept. of Fisheries & Oceans     
Pacific Biological Station
3190 Hammond Bay Rd.
Nanaimo, B.C., Canada
V9T-6N7
Michael.Folkes at dfo-mpo.gc.ca



More information about the R-help mailing list