optifix: optifix function

View source: R/optifix.R

optifixR Documentation

optifix function

Description

optifix. Optimise with fixed parameters

Usage

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

Arguments

par

X

fixed

X

fn

X

gr

X

...

X

method

X

lower

X

upper

X

control

X

hessian

X

Details

its like optim, but with fixed parameters.

specify a second argument 'fixed', a vector of TRUE/FALSE values. If TRUE, the corresponding parameter in fn() is fixed. Otherwise its variable and optimised over.

The return thing is the return thing from optim() but with a couple of extra bits - a vector of all the parameters and a vector copy of the 'fixed' argument.

Written by Barry Rowlingson <b.rowlingson@lancaster.ac.uk> October 2011

This file released under a CC By-SA license: http://creativecommons.org/licenses/by-sa/3.0/

and must retain the text: "Originally written by Barry Rowlingson" in comments.

Value

...


spatsurv documentation built on Oct. 19, 2023, 9:07 a.m.