On Mon, May 18, 2009 at 9:22 AM, Thomas Lumley <tlum...@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.) ______________________________________________ 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.