Chapter 9Add-in function minimization packages for R
CRAN (Comprehensive R Archive Network) and R-Forge have a number of packages for function minimization. Indeed, I am a developer involved in several of them. This chapter explores some of these. Truthfully, there is more material than can be sensibly included in one book, let alone one chapter of a book, but we will do our best to provide a decent overview.
9.1 Package optimx
The package optimx
(Nash and Varadhan, 2011a, 2011b) is a wrapper package for a number of optimization routines, including several of those included in the base system. One purpose is to unify the calls to a number of useful optimizers into a common syntax and thereby allow their performance comparison in an easy way. This ability for comparison makes the package a useful introduction to a number of the packages it calls. Different syntaxes for the calls to different routines are a great nuisance for the user and a frequent source of error.
However, optimx
is more than simply a tool to unify the calling sequence syntax. The design incorporates several important concepts that are discussed elsewhere in this book (see Chapter 3).
- A number of initial tests of the function, gradient, and scaling are available before optimization is attempted.
- After optimizers are complete, Kuhn–Karush–Tucker verification of the solutions is the default behavior if the number of parameters is not too large.
summary()
,coef()
, andprint()
methods are available for the returned ...
Get Nonlinear Parameter Optimization Using R Tools now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.