Dear all, I would like to use constraint optimization routine but with the constraint containing absolute values of the arguments.
For example I would like to maximize a log-likelihood function (loglik) wrt b where b is a vector of length=2 with the constraint abs(b[1])+abs(b[2])=2. The unconstraint optimization could be given by: loglik <- function(b) -colMeans(Y*log(Prob1(b))+(1-Y)*log(1-Prob1(b))) ML <- maxLik(loglik, start=matrix(1,k,1), method="NM") but I do not know which package or code can provide me with the solution of this particular optimization problem. Thank you all Dimitris -- View this message in context: http://r.789695.n4.nabble.com/Constraint-optimization-containing-constraints-with-absolute-values-tp4502083p4502083.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.