Finds optimum within a region
Usage
optim.funfits(fit, start, maximize=T, lower, upper, ...)
Arguments
fit
|
Object from a fitting procedure. A predict function for the fit
must be available.
|
start
|
Starting value for the search, the default is the middle of the region.
|
maximize
|
Default is to search for the maximum.
|
lower
|
Lower bound of parameters for optimization, default is the minimum of the data.
|
upper
|
Upper bound of parameters for optimization, default is the maximum of the data.
|
...
|
Optional arguments.
|
Description
The object from a fitting procedure must have a predict function.
Optim calls the function nlminb which finds a local minimum of a
smooth nonlinear function subject to bounded-constrained paramenters.Value
Returns a list with the followin values:
parameters
|
Final value of parameters at over which the optimization takes place.
|
objective
|
Final value of the objective function.
|
message
|
Statement of the reason for termination.
|
grad.norm
|
Final norm of the objective gradient.
|
iterations
|
Total number of iterations before terminiation.
|
f.evals
|
Total number of residual evaluations before the termination.
|
g.evals
|
Total number of jacobian evaluations before the termination.
|
hessian
|
Final value of the Hessian matrix, only if hessian is supplied intially.
|
scale
|
Final value of scale vector.
|
See Also
nlminb, predict.tps, predict.krig, predict.nnregExamples
tps(BD[,1:4],BD$lnya,scale.type="range") -> fit # fitting a DNA strand
# displacement amplification surface to various buffer compositions
surface(fit) # plots fitted surface and contours
optim(fit) # find surface optimum