[R] function optimization

2011-06-15 Thread navishkumarb
Hello I would like to optimize a function which is as follows. nc.adj <- function(nc, G) { x = a + G + (b/(G^2 + (c - G)^2)) - nc return(x) } Can I just know how to get the optimized values of a,b,c for given G and nc using optim/optimize function. -- View this message in context: ht

Re: [R] function optimization

2011-02-06 Thread Ben Bolker
garciap usal.es> writes: > this is my first time, and just begin to use R. But I've a question about > optimization using optimx library. It could sound stupid by I'm a bit > affraid with the problem, because anything I try, anything Error. > The procedure was: > optimx(par="10,71,1",fn=(Prey*P

[R] function optimization

2011-02-06 Thread garciap
Dear all, this is my first time, and just begin to use R. But I've a question about optimization using optimx library. It could sound stupid by I'm a bit affraid with the problem, because anything I try, anything Error. The procedure was: optimx(par="10,71,1",fn=(Prey*Provisioning)/Risk, control