Description Usage Arguments Details Value

This function carries out a minimization or maximization of a function using a trust region algorithm. See the references for details.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | ```
trust(
objfun,
parinit,
rinit,
rmax,
parscale,
iterlim = 100,
fterm = sqrt(.Machine$double.eps),
mterm = sqrt(.Machine$double.eps),
minimize = TRUE,
blather = FALSE,
parupper = Inf,
parlower = -Inf,
printIter = FALSE,
...
)
trustL1(
objfun,
parinit,
mu = 0 * parinit,
one.sided = FALSE,
lambda = 1,
rinit,
rmax,
parscale,
iterlim = 100,
fterm = sqrt(.Machine$double.eps),
mterm = sqrt(.Machine$double.eps),
minimize = TRUE,
blather = FALSE,
blather2 = FALSE,
parupper = Inf,
parlower = -Inf,
printIter = FALSE,
...
)
``` |

`objfun` |
an R function that computes value, gradient, and Hessian of the
function to be minimized or maximized and returns them as a list with
components value, gradient, and hessian. Its first argument should be a
vector of the length of parinit followed by any other arguments specified
by the |

`parinit` |
starting parameter values for the optimization. Must be feasible (in the domain). |

`rinit` |
starting trust region radius. The trust region radius (see details below) is adjusted as the algorithm proceeds. A bad initial value wastes a few steps while the radius is adjusted, but does not keep the algorithm from working properly. |

`rmax` |
maximum allowed trust region radius. This may be set very large. If set small, the algorithm traces a steepest descent path (steepest ascent, when minimize = FALSE). |

`parscale` |
an estimate of the size of each parameter at the minimum. The algorithm operates as if optimizing function(x, ...) objfun(x / parscale, ...). May be missing in which case no rescaling is done. See also the details section below. |

`iterlim` |
a positive integer specifying the maximum number of iterations to be performed before the program is terminated. |

`fterm` |
a positive scalar giving the tolerance at which the difference in objective function values in a step is considered close enough to zero to terminate the algorithm. |

`mterm` |
a positive scalar giving the tolerance at which the two-term Taylor-series approximation to the difference in objective function values in a step is considered close enough to zero to terminate the algorithm. |

`minimize` |
If TRUE minimize. If FALSE maximize. |

`blather` |
If TRUE return extra info. |

`parupper` |
named numeric vector of upper bounds. |

`parlower` |
named numeric vector of lower bounds. |

`printIter` |
print iteration information to R console |

`...` |
additional argument to objfun |

`mu` |
named numeric value. The reference value for L1 penalized parameters. |

`one.sided` |
logical. One-sided penalization. |

`lambda` |
strength of the L1 penalty |

`blather2` |
even more information |

See Fletcher (1987, Section 5.1) or Nocedal and Wright (1999, Section 4.2) for detailed expositions.

A list containing the following components:

value: the value returned by objfun at the final iterate.

gradient: the gradient returned by objfun at the final iterate.

hessian: the Hessian returned by objfun at the final iterate.

argument: the final iterate

converged: if TRUE the final iterate was deemed optimal by the specified termination criteria.

iterations: number of trust region subproblems done (including those whose solutions are not accepted).

argpath: (if blather == TRUE) the sequence of iterates, not including the final iterate.

argtry: (if blather == TRUE) the sequence of solutions of the trust region subproblem.

steptype: (if blather == TRUE) the sequence of cases that arise in solutions of the trust region subproblem. "Newton" means the Newton step solves the subproblem (lies within the trust region). Other values mean the subproblem solution is constrained. "easy-easy" means the eigenvectors corresponding to the minimal eigenvalue of the rescaled Hessian are not all orthogonal to the gradient. The other cases are rarely seen. "hard-hard" means the Lagrange multiplier for the trust region constraint is minus the minimal eigenvalue of the rescaled Hessian; "hard-easy" means it isn't.

accept: (if blather == TRUE) indicates which of the sequence of solutions of the trust region subproblem were accepted as the next iterate. (When not accepted the trust region radius is reduced, and the previous iterate is kept.)

r: (if blather == TRUE) the sequence of trust region radii.

rho: (if blather == TRUE) the sequence of ratios of actual over predicted decrease in the objective function in the trust region subproblem, where predicted means the predicted decrease in the two-term Taylor series model used in the subproblem.

valpath: (if blather == TRUE) the sequence of objective function values at the iterates.

valtry: (if blather == TRUE) the sequence of objective function values at the solutions of the trust region subproblem.

preddiff: (if blather == TRUE) the sequence of predicted differences using the two-term Taylor-series model between the function values at the current iterate and at the solution of the trust region subproblem.

stepnorm: (if blather == TRUE) the sequence of norms of steps, that is distance between current iterate and proposed new iterate found in the trust region subproblem.

dMod documentation built on Jan. 27, 2021, 1:07 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.