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'
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)
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
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