On Wed, 1 Aug 2007, Patrick Burns wrote:
> If you put in penalties for breaking constraints,
> it is generally better to make the penalty depend
> on the size of the violation. This keeps the function
> continuous (though usually not differentiable at the
> boundary), and gives the optimizer a hint about
> which way to go.
And this is what constrOptim does (though in a slightly more sophisticated
way that keeps the function twice-differentiable at the boundary). I
don't know why constrOptim() isn't applicable here -- the constraint looks
like a linear inequality to me.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
______________________________________________
[email protected] 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.