Hi Sir, How to use the "optim" for maximization. I don't understand the control$fnscale option that is given on help page. It says if the control$fnscale is negative, the function will be maximized. Thanks a lot Padmanand -- Padmanand Madhavan Nambiar Alternate e-mail id : anand at uga.edu (Patience pays) [[alternative HTML version deleted]]
Padmanand Madhavan Nambiar <padmanandm <at> gmail.com> writes:> > Hi Sir, > > How to use the "optim" for maximization. I don't understand the > control$fnscale option that is given on help page. It says if the > control$fnscale is negative, the function will be maximized. > > Thanks a lot > > PadmanandIf 'fn' is your objective function and 'par' is your starting parameter vector, just optim(par=par,fn=fn,control=list(fnscale=-1))