Skip to content
Prev 32777 / 398502 Next

Help with factorized argument in solve.QP

Yes -- this seems to be the case; the following example works as
expected. Thank you!

R          = matrix(rnorm(9),3,3)
R[lower.tri(R)] = 0
R.inv      = solve(R)
Dmat       = t(R) %*% R

dvec       = c(0,5,0)
Amat       = matrix(c(-4,-3,0,2,1,0,0,-2,1),3,3)
bvec       = c(-8,2,0)

x1 = solve.QP(Dmat=Dmat, dvec=dvec, Amat=Amat, bvec=bvec,
factorized=FALSE)
x2 = solve.QP(Dmat=R.inv, dvec=dvec, Amat=Amat, bvec=bvec,
factorized=TRUE)
print(x1$solution)
print(x2$solution)

-----Original Message-----
From: Peter Dalgaard BSA [mailto:p.dalgaard at biostat.ku.dk] 
Sent: 02 June 2003 18:12
To: David S. Khabie-Zeitoune
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] Help with factorized argument in solve.QP


"David S. Khabie-Zeitoune" <dave at mirabellafunds.com> writes:
Hmmm. Could it be that it is assuming a *triangular* square root of the
matrix?