[R] having problems with constrOptim

2005-04-09 Thread Tolga Uzuner
Hi, Am having problems specifying lower and upper constraints in constrOptim... I have a function(x)-f which takes a 5 vector array the constraints on the elements of x are: x[1],x[2],x[3],x[5]0 x[4]-1 x[1],x[2],x[3],x[4],x[5]1 this works: x [1] 0.400 0.200 0.200 -0.050 0.002

Re: [R] having problems with constrOptim

2005-04-09 Thread Ingmar Visser
ui %*% theta - ci has to be larger than zero, and it is not: ui=rbind(diag(5),-diag(5)) ui [,1] [,2] [,3] [,4] [,5] [1,]10000 [2,]01000 [3,]00100 [4,]00010 [5,]00001 [6,] -10

Re: [R] having problems with constrOptim

2005-04-09 Thread Tolga Uzuner
subtle... thanks, that works, appreciate it Ingmar Visser wrote: ui %*% theta - ci has to be larger than zero, and it is not: ui=rbind(diag(5),-diag(5)) ui [,1] [,2] [,3] [,4] [,5] [1,]10000 [2,]01000 [3,]00100 [4,]00