nls
, with sensible starting parameters obtained from optim
.pcrfit(data, cyc = 1, fluo, model = l4,
opt.method = rep("Nelder", 5), nls.method = "port", ...)
optim
or "GA". See 'Details'.nls
. Default is "port"
, which is quite robust.optim
, genoud
or nls
.opt.method
.model$ssfct
.
2) Starting values are refined by any of the methods available in optim
or the genoud
method
from the 'rgenoud' package. The opt.method
s can be combined to tweak the robustness, whereby the starting parameters are passed to
each succeeding method, i.e. rep("Nelder", 5) will do 5 successive Nelder-Mead optimisations or c("GA", "Nelder") will pass the starting
values from "GA" to "Nelder". If problems arise, "GA" has shown to be very robust (but slow!) in the refinement of starting values.
opt.method = c("BFGS", rep("Nelder, 3"))
works also quite well...
3) One of the possible methods from nls
is then applied with the starting values obtained from 2).
This function is to be used at the single run level. Otherwise use pcrbatch
or modlist
.
The output from the optim methods is checked by ensuring all eigenvalues from the hessian are positive, otherwise a notice will occur.## simple l4 fit of F1.1 of the 'reps' dataset
pcrfit(reps, 1, 2, l4)
## same with five-parameter model
## use "GA" method for optim
pcrfit(reps, 1, 2, l5, opt.method = "GA")
Run the code above in your browser using DataLab