Hello David,

 

same problem here with solve.QP. 

dykstra is causing problems as well and giving for the value NA if
factorized = TRUE:

 

library(quadprog)

library(Dykstra)

R<-cbind(c(1,1),c(0,1));

d<-c(t(R)%*%R%*%c(2,1))

solve.QP(solve(R),d,-as.matrix(c(1,1)),-2,1,factorized = TRUE)

S<-t(R)%*%R;

solve.QP(S,d,-as.matrix(c(1,1)),-2,1)

dykstra(solve(R),d,-as.matrix(c(1,1)),-2,1,factorized = TRUE)

dykstra(S,d,-as.matrix(c(1,1)),-2,1)

 

Nevertheless, factorized = TRUE yields false results, see 

solve.QP(t(R)%*%R,rep(0,2),diag(2),rep(2,2))

solve.QP(solve(R),rep(0,2),diag(2),rep(2,2),factorized = TRUE)

where you see that the first is correct and agrees with 

dykstra(t(R)%*%R,rep(0,2),diag(2),rep(2,2))

 

Best regards

 

Philipp


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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