Skip to content

(no subject)

6 messages · Debbie Zhang, Stefan Grosse, Martin Maechler +3 more

#
On Mon, 18 May 2009 17:33:51 +1030 Debbie Zhang
<debbie0621 at hotmail.com> wrote:
DZ> Based on a set of binomial sample data, how would you utilize the
DZ> "nlm" function in R to estimate the true proportion of the
DZ> population?

Dear Debbie,

This is a list that is mainly intended helping people if they have a
problem writing code. If you expect useful answers you should:

- follow the posting guide:
  "PLEASE do read the posting guide
  http://www.R-project.org/posting-guide.html and provide commented,
  minimal, self-contained, reproducible code."

- especially try NOT to give the impression that you are doing homeworks
  and expect others to do the work for you (thus show at least some
  effort: what you have searched/found and what you programmed to solve
  the problem see "homework before posting" in the posting guide)

- Use the subject field of the e-mail to give a pointer of the problem:
  it increases the probability that someone who has knowledge actually
  reads your mail

Thanks
Stefan
#
Dear Debbie,

can you **PLEASE**  use  a 'Subject' in your postings to R-help,

and also (see below)
DZ> Dear R users,

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

    DZ> Thanks.

    DZ> Debbie

    DZ> _________________________________________________________________
    DZ> [[elided Hotmail spam]]

    DZ> 	[[alternative HTML version deleted]]

    DZ> ______________________________________________
    DZ> R-help at r-project.org mailing list
    DZ> https://stat.ethz.ch/mailman/listinfo/r-help 

    	================================
    DZ> PLEASE do read the posting guide
    	================================

Yes, PLEASE do read *and* then follow it.

    DZ> http://www.R-project.org/posting-guide.html and provide
    DZ> commented, minimal, self-contained, reproducible code.

Also, given your postings, I'd start contemplating to add
something there 
saying that we do not "allow" more than two beginner's questions
per day for a specific beginner ...

In spite of the above:

Congratulations on chosing R, wishing you "happy houRs" !
Regards, 
Martin Maechler, ETH Zurich
#
On Mon, 18 May 2009, Debbie Zhang wrote:
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.

 	-thomas

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle
1 day later
#
On Mon, May 18, 2009 at 9:22 AM, Thomas Lumley <tlumley at u.washington.edu> wrote:
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.)
#
There are 17 different help pages in 5 different packages citing 
"Agresti and Coull".  This is quickly displayed using the "RSiteSearch" 
package as follows: 


library(RSiteSearch)
HTML(RSiteSearch.function("Agresti and Coull"))


      I have not checked all these 17, but they doubtless help explain 
Agresti and Coull's point that the term "exact confidence interval" is 
like a lot of terms in Marketing:  The substance falls far short of the 
hype for most purposes. 


      Hope this helps. 
      Spencer Graves
Douglas Bates wrote: