lme4 (version 1.1-7)

nloptwrap: Wrapper for nlOpt optimizers

Description

Wrapper to allow use of nlOpt optimizers for nonlinear optimization stage

Usage

nloptwrap(fn,par,lower,upper,control=list(),...)

Arguments

fn
objective function
par
starting parameter vector
lower
vector of lower bounds
upper
vector of upper bounds
control
list of control parameters
...
additional arguments to be passed to objective function

Value

  • parestimated parameters
  • fvalobjective function value at minimum
  • fevalnumber of function evaluations
  • convconvergence code (0 if no error)
  • messageconvergence message

Examples

Run this code
environment(nloptwrap)$defaultControl
library(lme4)
fm1 <- lmer(Reaction~Days+(Days|Subject),sleepstudy)
fm1_nloptr <- update(fm1,control=lmerControl(optimizer="nloptwrap"))
fm1_nloptr_NM <- update(fm1,control=lmerControl(optimizer="nloptwrap",
                            optCtrl=list(algorithm="NLOPT_LN_NELDERMEAD")))
## other algorithm options include NLOPT_LN_COBYLA, NLOPT_LN_SBPLX

Run the code above in your browser using DataCamp Workspace