[R] confine the value

Gabor Grothendieck ggrothendieck at gmail.com
Mon Oct 24 04:33:22 CEST 2005


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 at 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!!




More information about the R-help mailing list