optifix: optifix. Optimise with some fixed parameters

Description Usage Arguments Details Value Author(s) References

Description

Like optim, but with option to fix some parameters.

Usage

1
2
3
optifix(parms, fixed, fn, gr = NULL, ..., method = c("Nelder-Mead", "BFGS",
  "CG", "L-BFGS-B", "SANN"), lower = -Inf, upper = Inf, control = list(),
  hessian = FALSE)

Arguments

parms

Parameters to potentially optimize in fn

fixed

A vector of TRUE/FALSE values indicating which parameters in parms to hold constant (not optimize). If TRUE, the corresponding parameter in fn() is fixed. Otherwise it's variable and optimised over.

fn

Function to optimize (same as in optim)

gr

Gradient function (same as in optim)

...

Further arguments to be passed to fn and gr.

method

Method to use for optimization (same as in optim)

lower

Lower limits (same as in optim)

upper

Upper limits (same as in optim)

control

Control list (same as in optim)

hessian

Return Hessian object (same as in optim)

Details

Originally written by Barry Rowlingson"

Value

Similar to optim but adds a vector of all the parameters and a vector copy of the 'fixed' argument.

Author(s)

Written by Barry Rowlingson October 2011

References

http://www.maths.lancs.ac.uk/~rowlings/R/Optifix/optifix.R


bossMaps documentation built on May 2, 2019, 3:57 p.m.