[R] constrained optimization in R
Spencer Graves
spencer.graves at pdf.com
Tue Sep 21 20:46:33 CEST 2004
Have you considered doing an unconstrained penalized optimization,
e.g.
pen.f(x, X, penalty) = function(x)(f(x[1], x[2])+penalty*(g(x[1],
x[2])-X)^2)
Then give "pen.f" to optim. Start out with "penalty" small,
then use optim's answers with one value of penalty as starting values
for optim with double or 10 times the penalty. As long as f and g are
reasonably well behaved, this should produce an answer without excessive
effort.
hope this helps. spencer graves
Jason.L.Higbee at stls.frb.org wrote:
>R:
>
>I need to minimize a function such that the parameters when used in
>another function result in a particular value, which i fix. That is, I
>need min(f(a,b)) given g(a,b)=X, where min(.) is the minimum, f(.) and
>g(.) are functions (with unknown gradients) of parameters a and b and X is
>a fixed value. What optimization function(s) in R do you suggest?
>constrOptim looks like it will work except I don't know the gradient of
>the functions.
>
>Thanks,
>
>Jason Higbee
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>R-help at 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
>
>
--
Spencer Graves, PhD, Senior Development Engineer
O: (408)938-4420; mobile: (408)655-4567
More information about the R-help
mailing list