[R] linearly constrained Optimization

livia yn19832 at msn.com
Tue Jan 15 11:58:50 CET 2008

Hello everyone, 

I would like to maximize the following function fqp with linear constraits
and the codes are as following:
a= c(0.2,0.3,0.4)
fqp <- function(b) {t(b)%*%a-0.5*((t(b)%*%vcov)%*%b)}
constrOptim(c(b1,b2,b3), fqp,NULL,ui=?, ci=?, control=list(fnscale=-1))

The linear constrait is like abs(b1)+ abs(b2)+abs(b3) <= 1.5. How can I set
"ui" and "ci"?

Could anyone give me some advice?Many thanks.

View this message in context: http://www.nabble.com/linearly-constrained-Optimization-tp14837266p14837266.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list