Re: [R] Problem with minimization that I failed to understand

2025-03-28 Thread Daniel Lobo
Hi Rui, I was not aware of this function, however it looks like it should work for me. Many thanks for this intuition. However, in my optimization there are 3 constraints as below, 1) sum of all parameters should be 1 2) all parameters should be positive 3) last parameter should be greater than

Re: [R] Problem with minimization that I failed to understand

2025-03-28 Thread Rui Barradas
Às 13:59 de 28/03/2025, Daniel Lobo escreveu: Hi Duncan, Thanks for your comment, I agree with that. But, how it can be justified that an Optimizer gives a result which is inferior to the starting value? At most, resulting value can remain at the same level, isnt it? On Fri, 28 Mar 2025 at 14:

Re: [R] Problem with minimization that I failed to understand

2025-03-28 Thread Duncan Murdoch
That's a question for the maintainer of the package you used. Duncan Murdoch On 2025-03-28 9:59 a.m., Daniel Lobo wrote: Hi Duncan, Thanks for your comment, I agree with that. But, how it can be justified that an Optimizer gives a result which is inferior to the starting value? At most, resu

Re: [R] Problem with minimization that I failed to understand

2025-03-28 Thread J C Nash
Every time I give a seminar on optimization (most recently in Feb at Univ Cote d'Azur -- thank you Yassine for the welcome!) I point out Algorithms CONVERGE Programs TERMINATE If you race a Maserati (fmincon?) on a dirt bike course, you'll likely get stuck on the first mud mound, which co

Re: [R] Problem with minimization that I failed to understand

2025-03-28 Thread Daniel Lobo
Hi Duncan, Thanks for your comment, I agree with that. But, how it can be justified that an Optimizer gives a result which is inferior to the starting value? At most, resulting value can remain at the same level, isnt it? On Fri, 28 Mar 2025 at 14:34, Duncan Murdoch wrote: > I haven't run your

Re: [R] Problem with minimization that I failed to understand

2025-03-28 Thread Duncan Murdoch
I haven't run your code, but since Kendall correlation is based on ranks, your Fn is probably locally constant with jumps when the ranks change. That's a really hard kind of function to maximize, and the algorithm used by fmincon is not appropriate to do it. Sorry, but I don't know if there i