Performs a grid search to minimize the objective function
grid.search(obj, lower, upper, ngrid, ...)
objective function to be minimized
numeric vector giving the lower bound of grid for each dimension
numeric vector giving the upper bound of grid for each dimension
numeric vector giving the number of points each dimension
other arguments passed to obj
a numeric vector of the parameter that minimizes obj
This function first call expand.grid
then evaluate obj
to find a minimum. The number of calls to obj
is prod(ngrid)
.
This is useful for finding a good starting values for many optimization routines.