optim
, but with option to fix some parameters.
optifix(parms, fixed, fn, gr = NULL, ..., method = c("Nelder-Mead", "BFGS", "CG", "L-BFGS-B", "SANN"), lower = -Inf, upper = Inf, control = list(), hessian = FALSE)
fn
parms
to hold constant (not optimize). If TRUE, the corresponding parameter in fn() is fixed. Otherwise it's variable and optimised over.optim
)optim
)optim
)optim
)optim
)optim
)optim
)optim
but adds a vector of all the parameters and a vector copy of the 'fixed' argument.