egf_optimizer {epigrowthfit}R Documentation

Define an Optimization Method

Description

Utilities for linking an optimizer with optional arguments and control parameters to define an optimization method for use by egf.

Usage

egf_optimizer(f = nlminb, args = list(), control = list())

Arguments

f

a function performing optimization. Supported are newton, optim, nlminb, nlm, and any optim-like function.

args

a list of optional arguments to f not including control. If f = optim and args does not have method as an element, then method = "BFGS" is appended.

control

a list of control parameters to be passed to f.

Details

An optim-like function is a function f such that:

Value

A list inheriting from class egf_optimizer containing the validated arguments, wherein f may be a new function wrapping the supplied one to make it optim-like.

Examples

optimizer <- egf_optimizer(nlminb)
str(optimizer)

[Package epigrowthfit version 0.15.3 Index]