Re: [R] confine the value

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Mon 24 Oct 2005 - 12:33:22 EST

If x is the variable being optimized replace it with x = z^2 and optimize over z. That will constraint x to be nonnegative.

On 10/23/05, Chun-Ying Lee <u9370004@cc.kmu.edu.tw> wrote:
> Dear R users:
>
> I wonder if it is possible to confine the value which
> "optim" optimized to be all positive. I use optim with
> method "Nelder-Mead". Please give me some comments.
> Thanks in advance!!



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Oct 24 12:37:38 2005

This archive was generated by hypermail 2.1.8 : Mon 24 Oct 2005 - 15:12:28 EST