Re: [R] multi dimensional optim problem

2012-12-18 Thread Berend Hasselman
Forgot to cc the help list. On 18-12-2012, at 19:40, Lu, James T wrote: > I am attempting to use optim to solve a neural network problem. I would like > to optimize coefficients that are currently stored in a matrix > > Y=270 x 1 > X= 27- x 14 > b1= 10x14 > b2= 11x1 > V= 10 x 14 set of prior

[R] multi dimensional optim problem

2012-12-18 Thread Lu, James T
I am attempting to use optim to solve a neural network problem. I would like to optimize coefficients that are currently stored in a matrix Y=270 x 1 X= 27- x 14 b1= 10x14 b2= 11x1 V= 10 x 14 set of prior variances. I have the following function: posterior.mode1=function(y,X,b_0,b2,V) { log