Package: optimx 2024-4.18

optimx: Expanded Replacement and Extension of the 'optim' Function

Provides a replacement and extension of the optim() function to call to several function minimization codes in R in a single statement. These methods handle smooth, possibly box constrained functions of several or many parameters. Note that function 'optimr()' was prepared to simplify the incorporation of minimization codes going forward. Also implements some utility codes and some extra solvers, including safeguarded Newton methods. Many methods previously separate are now included here. This is the version for CRAN.

Authors:John C Nash [aut, cre], Ravi Varadhan [aut], Gabor Grothendieck [ctb]

optimx_2024-4.18.tar.gz
optimx_2024-4.18.zip(r-4.5)optimx_2024-4.18.zip(r-4.4)optimx_2024-4.18.zip(r-4.3)
optimx_2024-4.18.tgz(r-4.4-any)optimx_2024-4.18.tgz(r-4.3-any)
optimx_2024-4.18.tar.gz(r-4.5-noble)optimx_2024-4.18.tar.gz(r-4.4-noble)
optimx_2024-4.18.tgz(r-4.4-emscripten)optimx_2024-4.18.tgz(r-4.3-emscripten)
optimx.pdf |optimx.html
optimx/json (API)
NEWS

# Install 'optimx' in R:
install.packages('optimx', repos = c('https://nashjc.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/nashjc/optimx/issues

On CRAN:

42 exports 1 stars 6.40 score 3 dependencies 83 dependents 21 mentions 1.4k scripts 10.3k downloads

Last updated 5 months agofrom:9d3dc37784. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKAug 23 2024
R-4.5-winOKAug 23 2024
R-4.5-linuxOKAug 23 2024
R-4.4-winOKAug 23 2024
R-4.4-macOKAug 23 2024
R-4.3-winOKAug 23 2024
R-4.3-macOKAug 23 2024

Exports:axsearchbmchkbmstepcheckallsolverschecksolvercoef<-ctrldefaultdispdefaultfnchkgHgengHgenbgrbackgrcentralgrchkgrfwdgrndgrpracmahesschkhjnkktchkmultistartncgnvmopmopm2optimroptchkoptimroptimxoptsppolyoptproptimrRcgminRcgminbRcgminuRvmminRvmminbRvmminuscalechksnewtmsnewtontntnbc

Dependencies:nloptrnumDerivpracma

Explaining Gradient Minimizers in R

Rendered fromExplainGradMinR.pdf.asisusingR.rsp::asison Aug 23 2024.

Last update: 2024-03-15
Started: 2023-09-05

Intro to optimx

Rendered fromIntro-to-optimx.pdf.asisusingR.rsp::asison Aug 23 2024.

Last update: 2024-03-15
Started: 2023-09-05

Rvmmin - an R implementation of the Fletcher(1970) variable metric method with bounds and masks

Rendered fromRvmmin.pdf.asisusingR.rsp::asison Aug 23 2024.

Last update: 2024-03-15
Started: 2023-09-05

SNewton: safeguarded Newton methods for function minimization

Rendered fromSNewton.pdf.asisusingR.rsp::asison Aug 23 2024.

Last update: 2024-03-15
Started: 2023-09-05

Using and extending the optimx package

Rendered fromExtend-optimx.pdf.asisusingR.rsp::asison Aug 23 2024.

Last update: 2024-03-15
Started: 2023-09-05

Readme and manuals

Help Manual

Help pageTopics
A replacement and extension of the optim() function, plus various optimization toolsoptimx-package
Perform axial search around a supposed MINIMUM and provide diagnosticsaxsearch
Check bounds and masks for parameter constraints used in nonlinear optimizationbmchk
Compute the maximum step along a search direction.bmstep
Test if requested solver is presentcheckallsolvers checksolver
Summarize opm objectcoef.opm coef.optimx coef<- coef<-.opm coef<-.optimx
set control defaultsctrldefault dispdefault
Run tests, where possible, on user objective functionfnchk
Generate gradient and Hessian for a function at given parameters.gHgen
Generate gradient and Hessian for a function at given parameters.gHgenb
Backward difference numerical gradient approximation.grback
Central difference numerical gradient approximation.grcentral
Run tests, where possible, on user objective function and (optionally) gradient and hessiangrchk
Forward difference numerical gradient approximation.grfwd optsp
A reorganization of the call to numDeriv grad() function.grnd
A reorganization of the call to numDeriv grad() function.grpracma
Run tests, where possible, on user objective function and (optionally) gradient and hessianhesschk
Compact R Implementation of Hooke and Jeeves Pattern Search Optimizationhjn
Check Kuhn Karush Tucker conditions for a supposed function minimumkktchk
General-purpose optimization - multiple startsmultistart
General-purpose optimizationopm
Extract optim() solution for one method of opm() resultopm2optimr
General-purpose optimizationoptchk
General-purpose optimizationoptimr
General-purpose optimizationas.data.frame.optimx optimx [.optimx
General-purpose optimization - sequential application of methodspolyopt
Compact display of an 'optimr()' result objectproptimr
An R implementation of a nonlinear conjugate gradient algorithm with the Dai / Yuan update and restart. Based on Nash (1979) Algorithm 22 for its main structure.ncg ncgqs Rcgmin
An R implementation of a bounded nonlinear conjugate gradient algorithm with the Dai / Yuan update and restart. Based on Nash (1979) Algorithm 22 for its main structure. CALL THIS VIA 'Rcgmin' AND DO NOT USE DIRECTLY.Rcgminb
An R implementation of an unconstrained nonlinear conjugate gradient algorithm with the Dai / Yuan update and restart. Based on Nash (1979) Algorithm 22 for its main structure. CALL THIS VIA 'Rcgmin' AND DO NOT USE DIRECTLY.Rcgminu
Variable metric nonlinear function minimization, driver.nvm Rvmmin
Variable metric nonlinear function minimization with bounds constraintsRvmminb
Variable metric nonlinear function minimization, unconstrainedRvmminu
Check the scale of the initial parameters and bounds input to an optimization code used in nonlinear optimizationscalechk
Safeguarded Newton methods for function minimization using R functions.snewtm snewton
Summarize optimx objectsummary.optimx
Truncated Newton minimization of an unconstrained function.tn
Truncated Newton function minimization with bounds constraintstnbc