get.best: Return best optimx result in the form that optim() returns

Description Usage Arguments Details Value

View source: R/get.best.R

Description

The optimx general-purpose optimization wrapper function that calls other R tools for optimization, including the existing optim() function, creates a data frame of results. get.best selects the best of these (at time of writing maximization problems may not work) and returns this answer in the form that matches the return from optim.

Usage

1
   get.best(optimx.obj, maximize=FALSE) 

Arguments

optimx.obj

object returned by ‘optimx’

maximize

TRUE if the objective function is to be maximized.

Details

None

Value

get.best returns a list

par

The vector of parameters at the supposed optimum

value

The value of the objective at the supposed optimum

counts

A vector of length 2 with the number of function and gradient calls respectively.

convergence

A code indicating the status of the result. See relevant optimizer.

message

A message, if any, returned by the optimizer. To allow the user to know which method was used to obtain this result, the method is appended to this message.

hessian

If available, the (approximate) Hessian matrix at the returned parameters.


optplus documentation built on May 2, 2019, 6:48 p.m.