pvec: Initial values of the model parameters to be optimized. pvec is a data frame comprising four columns ( "val","min","max","active") and as many rows as there are model parameters. The "active" field (logical) determines whether the parameters are estimated (T) or remain fixed (F).
func: The user-defined function to be minimized (or maximized). The function should return a scalar result.
method: The minimization method to use: one of nlm, nlminb, Nelder-Mead, BFGS, CG, L-BFGS-B, or SANN. Default is nlm.
trace: Non-negative integer. If positive, tracing information on the progress of the minimization is produced. Higher values may produce more tracing information: for method "L-BFGS-B" there are six levels of tracing. Default is 0.
maxit: The maximum number of iterations. Default is 1000.
reltol: Relative convergence tolerance. The algorithm stops if it is unable to reduce the value by a factor of reltol*(abs(val)+reltol)
at a step. Default is 1e-8.
steptol: A positive scalar providing the minimum allowable relative step length. Default is 1e-6.
temp: Temperature controlling the "SANN" method. It is the starting temperature for the cooling schedule. Default is 10.
repN: Reports the parameter and objective function values on the R-console every repN evaluations. Default is 0 for no reporting.
...: Further arguments to be passed to the optimizing function chosen: nlm, nlminb, or optim. Beware of partial matching to earlier arguments.
Details
See optim for details on the following methods: Nelder-Mead, BFGS, CG, L-BFGS-B, and SANN.
Returns
A list with components: - Fout: The output list from the optimizer function chosen through method.
iters: Number of iterations.
evals: Number of evaluations.
cpuTime: The user CPU time to execute the minimization.
elapTime: The total elapsed time to execute the minimization.
fminS: The objective function value calculated at the start of the minimization.
fminE: The objective function value calculated at the end of the minimization.
Pstart: Starting values for the model parameters.
Pend: Final values estimated for the model parameters from the minimization.
AIC: Akaike's Information Criterion
message: Convergence message from the minimization routine.
Author(s)
Jon T. Schnute, Pacific Biological Station, Fisheries and Oceans Canada, Nanaimo BC
Note
Some arguments to calcMin have no effect depending on the method chosen.