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