grid.search: Performs a grid search to minimize the objective function

Description Usage Arguments Details Value Author(s) See Also

View source: R/parncp.R

Description

Performs a grid search to minimize the objective function

Usage

1
grid.search(obj, lower, upper, ngrid, ...)

Arguments

obj

objective function to be minimized

lower

numeric vector giving the lower bound of grid for each dimension

upper

numeric vector giving the upper bound of grid for each dimension

ngrid

numeric vector giving the number of points each dimension

...

other arguments passed to obj

Details

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.

Value

a numeric vector of the parameter that minimizes obj

Author(s)

Long Qu

See Also

optim


pi0 documentation built on May 2, 2019, 4:47 p.m.