[R] (no subject)

Douglas Bates bates at stat.wisc.edu
Tue May 19 22:51:43 CEST 2009


On Mon, May 18, 2009 at 9:22 AM, Thomas Lumley <tlumley at u.washington.edu> wrote:
> On Mon, 18 May 2009, Debbie Zhang wrote:

>> Based on a set of binomial sample data, how would you utilize the "nlm"
>> function in R to estimate the true proportion of the population?

> I can't see why anyone would want to use nlm() for this.  The sample
> proportion is the MLE, and binom.test() gives an exact confidence interval.

Homework exercise intended to teach the use of optimization when you
can separately work out what the answer should be?

And, as you probably know, the exact confidence interval from
binom.test is not as "good" as the approximate interval described by
Agresti and B.A. Coull in a 1998 American Statistician article.  (The
coverage of the exact interval is at least the nominal value but it
can be greater because the binomial is discrete.)




More information about the R-help mailing list