Re: [R] Problem with constrained optimization with maxBFGS

2011-05-13 Thread peter dalgaard
be zero. > > JN > > >> >> Date: Wed, 11 May 2011 17:28:54 -0300 >> From: Leonardo Monasterio >> To: r-help@r-project.org >> Subject: [R] Problem with constrained optimization with maxBFGS >> Message-ID: >> Content-Type: text/plain >>

Re: [R] Problem with constrained optimization with maxBFGS

2011-05-12 Thread Prof. John C Nash
0300 > From: Leonardo Monasterio > To: r-help@r-project.org > Subject: [R] Problem with constrained optimization with maxBFGS > Message-ID: > Content-Type: text/plain > > Dear all, > > I need to maximize the v: > > v= D' W D > > > D is a column vecto

[R] Problem with constrained optimization with maxBFGS

2011-05-11 Thread Leonardo Monasterio
Dear all, I need to maximize the v: v= D' W D D is a column vector ( n , 1) W is a given matrix (n, n) subject to: sum D= 1 (BTW, n is less than 300) I´ve tried to use maxBFGS, as follows: # objectiveFunction<-function(x) { return(t(D)%*%W%*%D) } Amat