Re: [R] Bad optimization solution

2007-05-08 Thread Paul Smith
> > > > Ravi Varadhan, Ph.D. > > > > > > Assistant Professor, The Center on Aging and Health > > > > > > Division of Geriatric Medicine and Gerontology > > > > > > Johns Hopkins University > > > > > > Ph: (410) 502-2619 > > > > > > Fax: (410) 614-9625 >

Re: [R] Bad optimization solution

2007-05-08 Thread S Ellison
Paul, You have picked a function that is not smoothly differentiable and also started at one of many 'stationary' points in a system with multiple solutions. In practice, I think it'll get a zero gradient as the algorithm does things numerically and you have a symmetric function. It probably the

Re: [R] Bad optimization solution

2007-05-08 Thread RAVI VARADHAN
to using your analytic powers! Ravi. - Original Message - From: Paul Smith <[EMAIL PROTECTED]> Date: Tuesday, May 8, 2007 4:33 am Subject: Re: [R] Bad optimization solution To: R-help > It seems that there is here a problem of reliability, as one never > knows whether th

Re: [R] Bad optimization solution

2007-05-08 Thread Jasjeet Singh Sekhon
> > > Johns Hopkins University > > > > Ph: (410) 502-2619 > > > > Fax: (410) 614-9625 > > > > Email: [EMAIL PROTECTED] > > > > Webpage: http://www.jhsph.edu/agingandhealth/People/Faculty/Varadhan.html > > > > > > > > ---------

Re: [R] Bad optimization solution

2007-05-08 Thread Paul Smith
age- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Paul Smith > Sent: Monday, May 07, 2007 6:26 PM > To: R-help > Subject: Re: [R] Bad optimization solution > > On 5/7/07, Paul Smith <[EMAIL PROTECTED]> wrote: > > > I think the problem i

Re: [R] Bad optimization solution

2007-05-07 Thread Berwin A Turlach
G'day all, On Tue, 8 May 2007 12:10:25 +0800 Berwin A Turlach <[EMAIL PROTECTED]> wrote: > > I am trying to perform the below optimization problem, but getting > > (0.5,0.5) as optimal solution, which is wrong; > > Why? > > As far as I can tell you are trying to minimize |x1-x2| It was point

Re: [R] Bad optimization solution

2007-05-07 Thread Berwin A Turlach
G'day Paul, On Mon, 7 May 2007 23:25:52 +0100 "Paul Smith" <[EMAIL PROTECTED]> wrote: [...] > Furthermore, X^2 is everywhere differentiable and notwithstanding the > reported problem occurs with > > myfunc <- function(x) { > x1 <- x[1] > x2 <- x[2] > (x1-x2)^2 > } Same argument as with ab

Re: [R] Bad optimization solution

2007-05-07 Thread Berwin A Turlach
G'day Paul, On Mon, 7 May 2007 22:30:32 +0100 "Paul Smith" <[EMAIL PROTECTED]> wrote: > I am trying to perform the below optimization problem, but getting > (0.5,0.5) as optimal solution, which is wrong; Why? As far as I can tell you are trying to minimize |x1-x2| where x1 and x2 are between 0

Re: [R] Bad optimization solution

2007-05-07 Thread Ravi Varadhan
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Smith Sent: Monday, May 07, 2007 6:26 PM To: R-help Subject: Re: [R] Bad optimization solution On 5/7/07, Paul Smith <[EMAIL PROTECTED]> wrote: > > I think the problem is the starting

Re: [R] Bad optimization solution

2007-05-07 Thread Sundar Dorai-Raj
To >>> Sent by: R-help >>> [EMAIL PROTECTED] cc >>> at.math.ethz.ch >>>

Re: [R] Bad optimization solution

2007-05-07 Thread Paul Smith
Sent by: R-help > > [EMAIL PROTECTED] cc > > at.math.ethz.ch > > Subject > >

Re: [R] Bad optimization solution

2007-05-07 Thread Paul Smith
R-help > [EMAIL PROTECTED] cc > at.math.ethz.ch > Subject >[R] Bad optimization solution > 05/07/2007 04:30 >

Re: [R] Bad optimization solution

2007-05-07 Thread apjaworski
[EMAIL PROTECTED] cc at.math.ethz.ch Subject [R] Bad optimization solution

[R] Bad optimization solution

2007-05-07 Thread Paul Smith
Dear All I am trying to perform the below optimization problem, but getting (0.5,0.5) as optimal solution, which is wrong; the correct solution should be (1,0) or (0,1). Am I doing something wrong? I am using R 2.5.0 on Fedora Core 6 (Linux). Thanks in advance, Paul ---