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

Pascal Oettli
Tue, 10 Sep 2013 04:16:20 -0000

Hello,

Are you sure of the alpha value?

Regards,
Pascal


2013/9/10 Folkes, Michael <Michael.Folkes@dfo-mpo.gc.ca>

> 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@dfo-mpo.gc.ca
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



--
Pascal Oettli
Project Scientist
JAMSTEC
Yokohama, Japan

	[[alternative HTML version deleted]]