Hello everybody,

I have a question about box-constrained optimization. I've done some
research and I found that optim could do that. Are there other ways in R ?

Is the following correct if I have a function f of two parameters belonging
for example to [0,1] and [0,Infinity] ?
optim(par=param, fn=f, method="L-BFGS-B", lower=c(0,0), upper=c(1,Inf))

My other question is whether it is possible to add the derivatives of my
function (like in nlm) and whether it is better to add them ?

If there is no need to add the derivatives, then I guess I could wish to
optimize the likelihood directly rather than to optimize the
log-likelihood... Indeed one aspect of the log-likelihood is to make the
derivatives tractable (in iid cases). Do you agree ?

Thank you !
Gustave

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to