[R-sig-Geo] Help for optim

Paulo Justiniano Ribeiro Jr paulojus at c3sl.ufpr.br
Mon Jul 29 17:50:33 CEST 2013


from the section Details of
?optim


By default ‘optim’ performs minimization, but it will maximize if
      ‘control$fnscale’ is negative.


Alternatively your chance the sigh of what is returned by your function



Paulo Justiniano Ribeiro Jr
LEG (Laboratorio de Estatistica e Geoinformacao)
Universidade Federal do Parana
Caixa Postal 19.081
CEP 81.531-990
Curitiba, PR  -  Brasil
Tel: (+55) 41 3361 3573
VOIP: (+55) (41) (3361 3600) 1053 1066
Fax: (+55) 41 3361 3141
e-mail: paulojus AT  ufpr  br
http://www.leg.ufpr.br/~paulojus

On Mon, 29 Jul 2013, Saman Monfared wrote:

> Dear all,
> I want to optimize a function using optim. I have two problems:
> 1-how can i minimize function which fn value be positive because it can be
> negative?
> 2- how can i change it to maximization?
> Best,
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>


More information about the R-sig-Geo mailing list