Hello. I have searched the archives but have not found anything. I need to solve a constrained optimisation problem for a nonlinear function (“maximum entropy formalism”). Specifically, Optimise: -1*SUM(p_ilog(p_i)) for a vector p_i of probabilities, conditional on a series of constraints of the form: SUM(T_i*p_i)=k_i for given values of T_i and k_i (these are constraints on expectations). Can this be done in R? Bill Shipley Associate Editor, Ecology North American Editor, Annals of Botany Département de biologie, Université de Sherbrooke, Sherbrooke (Québec) J1K 2R1 CANADA Bill.Shipley@USherbrooke.ca <http://callisto.si.usherb.ca:8080/bshipley/> http://callisto.si.usherb.ca:8080/bshipley/ [[alternative HTML version deleted]]
> Hello. I have searched the archives but have not found anything. I > need to solve a constrained optimisation problem for a nonlinear > function (“maximum entropy formalism”). Specifically, > > Optimise: -1*SUM(p_ilog(p_i)) for a vector p_i of probabilities, > conditional on a series of constraints of the form: > > SUM(T_i*p_i)=k_i for given values of T_i and k_i (these are > constraints on expectations). >A better answer may exist to this question, but here goes anyway.... Could you use sequential quaratic programming here (i.e. just constrain the QP problem generated at each iterate of Newton's method)? There's an R library for quadratic programming.... Simon _____________________________________________________________________> Simon Wood simon at stats.gla.ac.uk www.stats.gla.ac.uk/~simon/ >> Department of Statistics, University of Glasgow, Glasgow, G12 8QQ >>> Direct telephone: (0)141 330 4530 Fax: (0)141 330 4814