Re: [R] Strange behavior of interval values in optimize()

2010-09-06 Thread Michael Bernsteiner
ize(f, interval=c(-100, 1), P=c(0.99,1.01), U=c(1,0)) > result $minimum [1] -1.989994 $objective [1] 4.01 This does still make no sense for me Fabian > Date: Mon, 6 Sep 2010 06:18:16 -0700 > From: dieter.me...@menne-biomed.de > To: r-help@r-project.org > Subject: Re: [R]

Re: [R] Strange behavior of interval values in optimize()

2010-09-06 Thread Dieter Menne
Michael Bernsteiner wrote: > > > I'm using optimize() to find the minimum of the following function f, and > minimize it (without > . > But, when I choose a larger Interval in the optimization method: > > The result gets worse (even though the old interval is included in the new > one

[R] Strange behavior of interval values in optimize()

2010-09-06 Thread Michael Bernsteiner
Hi all, I'm using optimize() to find the minimum of the following function f, and minimize it (without f<-function(delta,P,U){ minimiz<-P+delta*U x<-minimiz[1] y<-minimiz[2] z<-100*(y-x^2)^2+(1-x)^2 return(z) } result<-optimize(f, interval=c(-1, 1), P=c(0.99,1.01), U=c