Re: [R] how to find the minimum

From: Charles C. Berry <cberry_at_tajo.ucsd.edu>
Date: Mon, 28 Apr 2008 21:51:36 -0700

On Mon, 28 Apr 2008, Bin Yue wrote:

>
> Dear friends:
> I am a new R user, and not very good at statistics and maths
> I find it difficult to find the minimum of this item:
> ((p*(b-1)-1)*(p+1)^(b-1)+1)/p^2
>
> It seems that the method optim can find the minimum. I tried several
> times , but R constanly tells that " failure to find b or p"
> Would you please give some suggestions?

  1. follow the posting guide
  2. "provide commented, minimal, self-contained, reproducible code"
  3. be sure optim 'understands' what the domain of your function is. You do this by choosing explicit constraints or a suitable reparameterization.
  4. make sure you understand your function well enough to carry out 3. You do this by plotting your function and/ or plugging in some trial values. Or you do some actual math and try to figure out if there are multiple minima, places where derivatives do not exist, and so on. If there are such troublesome issues, you will need to sort them out before optim has a chance at finding a useful answer.

HTH, Chuck

> Thanks in advance.
> Best wishes,
> Bin Yue
>
> -----
> Best regards,
> Bin Yue
>
> *************
> student for a Master program in South Botanical Garden , CAS
>
> --
> View this message in context: http://www.nabble.com/how-to-find-the-minimum-tp16952701p16952701.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
>

Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry_at_tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901

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. Received on Tue 29 Apr 2008 - 04:58:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 29 Apr 2008 - 05:30:31 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive