Hello,
I would like to optimize the function "fqp" as following:
a= c(0.2,0.3,0.4) 
vcov=matrix(c(1,2,3,4,5,6,7,8,9),3,3) 
fqp <- function(b) {t(b)%*%a-0.5*((t(b)%*%vcov)%*%b)} 

I want the linear constraint to be something  like abs(b1)+ abs(b2)+abs(b3)
= 1.5. 

I found it diffcult to use "constrOptim" in this case.

Could anyone give me some advice? Many thanks.


-- 
View this message in context: 
http://www.nabble.com/linear-constraints---absolute-value-tp14999843p14999843.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to