fit_opt | R Documentation |
nonlinear optimization: wrapper for optimx and nloptr
fit_opt( objective, start, lower = NULL, upper = NULL, hessian = FALSE, package = "optimx", method = NULL, restart = FALSE, consecutive = 0L, max_runs = Inf, sigma = 0.1, tol = 1e-05, verbose = FALSE, opt_args = list(), obj_args = list(), ... )
objective |
function; the objective function to minimize |
start |
numeric vector; starting parameters |
lower |
numeric vector; lower bounds for parameters |
upper |
numeric vector; upper bounds for parameters |
hessian |
logical; if TRUE, calculate hessian at solution |
package |
string; package to use, see Details. Default = "optimx" |
method |
string; method to use from package |
restart |
logical; if TRUE, restart optimization until no more improvement. Default = FALSE |
max_runs |
integer; maximum number of optimx runs. Default = Inf |
sigma |
numeric; standard deviation for random perturbation of starting values |
verbose |
logical; if TRUE, print result summary after each iteration.Default=FALSE |
opt_args |
list; list of arguments to be passed to optimx |
obj_args |
list; list of arguments to be passed to objective function |
... |
further arguments objective |
conescutive |
integer; stop after this number of consecutive runs without improvement. Default = 0 |
tolerance |
numeric; new fit must change objective by 'tolerance' to be considered an improvement |
Package options = "optimx", "optim", "nloptr", "pracma"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.