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

Folkes, Michael Michael.Folkes at dfo-mpo.gc.ca
Tue Sep 10 18:54:53 CEST 2013


Thanks for your reply Pascal.
The alpha argument in binconf() is "probability of a type I error, so
confidence coefficient = 1-alpha".
Alternately, binom::binom.confint() is given the argument as confidence
level.
The 'exact' method in both functions gives results as expected. It's
just odd for me to go that way when binconf() help says:
"Following Agresti and Coull, the Wilson interval is to be preferred and
so is the default."

Cheers
Michael

________________________________

From: skalp.oettli at gmail.com [mailto:skalp.oettli at gmail.com] On Behalf
Of Pascal Oettli
Sent: September 9, 2013 9:16 PM
To: Folkes, Michael
Cc: R help
Subject: Re: [R] Hmisc binconf function value interpretation during
narrow confidence intervals


Hello,

Are you sure of the alpha value?

Regards,
Pascal

2013/9/10 Folkes, Michael <Michael.Folkes at 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 at dfo-mpo.gc.ca
	
	______________________________________________
	R-help at 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



More information about the R-help mailing list