Re: [R] quadratic programming-maximization instead of minization

2012-01-03 Thread Tsjerk Wassenaar
Sorry, that should've been sum(diag(D)) or max(eigen(D)$values) in stead of max(diag(D)). Tsjerk On Jan 3, 2012 4:52 PM, "Tsjerk Wassenaar" wrote: Hi Riccardo, Would it be possible to use max(diag(D))*diag(ncol(D)) - D ? That also reverses the order of eigenvalues/-vectors. Cheers, Tsjerk >

Re: [R] quadratic programming-maximization instead of minization

2012-01-03 Thread Tsjerk Wassenaar
Hi Riccardo, Would it be possible to use max(diag(D))*diag(ncol(D)) - D ? That also reverses the order of eigenvalues/-vectors. Cheers, Tsjerk On Jan 2, 2012 4:35 PM, "riccardo24" wrote: Hi, I need to maximize a quadratic function under constraints in R. For minimization I used solve.QP but f

Re: [R] quadratic programming-maximization instead of minization

2012-01-02 Thread Ken Hutchison
I don't have experience with this in R and I'm not sure I understand the question that well but maybe something like nearPD()? Ken Hutchison On Jan 2, 2012, at 6:36 AM, riccardo24 wrote: > Hi, I need to maximize a quadratic function under constraints in R. > For minimization I used solve.QP

[R] quadratic programming-maximization instead of minization

2012-01-02 Thread riccardo24
Hi, I need to maximize a quadratic function under constraints in R. For minimization I used solve.QP but for maximization it is not useful since the matrix D of the quadratic function should be positive definite hence I cannot simply change the sign. any suggestion ? thanks -- View this message i