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

2025-03-27 Thread Daniel Lobo
The objective is to MAXIMIZE the Kendall Correlation. Given that ?pracma::fmincon minimizes the function, I added a negative sign in the objective function. Description Find minimum of multivariable functions with nonlinear constraints. Therefore we should not remove the negative sign. On Fri,

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

2025-03-27 Thread Rui Barradas
Às 19:36 de 27/03/2025, Daniel Lobo escreveu: My code is to minimize the objective function therefore, shouldnt I expect that StartingValue = c(0.12, 0.04, 0.07, 0.03, 0.06, 0.07, 0.07, 0.04, 0.09, 0.08, 0.02, 0.02, 0.03, 0.06, 0.02, 0, 0.07, 0.05, 0.02, 0.02, 0.02) Fn(q1$par) < Fn(StartingValu

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

2025-03-27 Thread Daniel Lobo
My code is to minimize the objective function therefore, shouldnt I expect that StartingValue = c(0.12, 0.04, 0.07, 0.03, 0.06, 0.07, 0.07, 0.04, 0.09, 0.08, 0.02, 0.02, 0.03, 0.06, 0.02, 0, 0.07, 0.05, 0.02, 0.02, 0.02) Fn(q1$par) < Fn(StartingValue) ## FALSE Below is the corrected code that ca

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

2025-03-27 Thread Rui Barradas
Às 18:35 de 27/03/2025, Daniel Lobo escreveu: Hi, I have below minimization problem MyDat = structure(list(c(50L, 0L, 0L, 50L, 75L, 100L, 50L, 0L, 50L, 0L, 25L, 50L, 50L, 75L, 75L, 75L, 0L, 75L, 75L, 75L, 0L, 25L, 75L, 75L, 0L, 75L, 100L, 0L, 25L, 100L), c(75L, 0L, 0L, 50L, 100L, 50L, 75L, 75L

[R] Problem with minimization that I failed to understand

2025-03-27 Thread Daniel Lobo
Hi, I have below minimization problem MyDat = structure(list(c(50L, 0L, 0L, 50L, 75L, 100L, 50L, 0L, 50L, 0L, 25L, 50L, 50L, 75L, 75L, 75L, 0L, 75L, 75L, 75L, 0L, 25L, 75L, 75L, 0L, 75L, 100L, 0L, 25L, 100L), c(75L, 0L, 0L, 50L, 100L, 50L, 75L, 75L, 100L, 25L, 0L, 25L, 100L, 0L, 50L, 0L, 25L, 25