On Wed, 1 Aug 2007, Joanne Lee wrote: > > The constraints on the optimization problem are: > 1 - components of potentialargmin must add to 1. > 2 - each potentialargmin component must be (weakly) positive and > (weakly) less than 1. > 3 - potentialargmin %*% c(1,2,3,4,5,6,7,8,9) = 4.5 >
constrOptim() is not good at equality constraints, so constraints 1 and 3 would be better expressed by reparametrization. There is no need to constrain the parameters to be positive as the function already goes infinite at zero. Finally, if the parameters are non-negative there is no need to constrain them to be <=1, as this is implied by the first constraint. It might be interesting to find out if some automated Lagrange-multiplier approach could be built into constrOptim() for equality constraints, but it is not a high enough priority that I am likely to do it. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle ______________________________________________ R-help@stat.math.ethz.ch 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.