Re: [R] problems with optimize (again)

2006-05-10 Thread Dimitris Rizopoulos
you should use: optmz - optimize(fitIT, interval = c(0.5, 4), ts_wave1 = test.data[, 1], ts_template = test.data[, 1]) calcFit(test.data[, 1], stretchWaveTime(test.data[, 1], optmz$minimum) which should give the same as optmz$objective, i.e., the optmz$minimum is the value of 'ampFac'

Re: [R] problems with optimize (again)

2006-05-10 Thread Uwe Ligges
tom wright wrote: Can someone please explain what the $minimum result of the optimize function actually is? I'm trying to optimize the function: fitIT-function(ampFac,ts_wave1,ts_template){ template-stretchWaveTime(ts_template,ampFac) fit-calcFit(ts_wave1,template)

Re: [R] Problems with optimize

2004-03-29 Thread Uwe Ligges
Chiara Seghieri wrote: Dear All, I'm trying to maximize a likelihood with respect one parameter using optimize on simulated data (without error component). I've iterated the maximization procedure 1000 times and I should always obtain the same estimate of the parameter (equal to the simulated

RE: [R] Problems with optimize

2004-03-29 Thread Wayne Jones
If indeed your error space is pitted with local minima then I suggest you might try a method called bootstrap restarting to avoid these spurious local minimas. The paper was authored by Simon Wood and can be found here http://www.stats.gla.ac.uk/~simon/simon/papers/bsfit.pdf -Original