[Rd] constrained optimiser doesn't obey constraints (PR#411)
Prof Brian D Ripley
ripley@stats.ox.ac.uk
Fri, 4 Feb 2000 18:46:18 +0000 (GMT)
Your example seems not valid R (it gives me syntax errors, and with the use
of _ with no space around is completely unreadable to me: I suspect some
lines got split in the wrong place), so I can't run it. However, I think
the problem is that you
1) Are not supplying derivatives
2) Have a non-differentiable function over the space.
3) Started too near the boundary (the finite-difference step is 1e-3,
by default).
and so the finite-difference code is not obeying the constraints.
Really you need either to supply derivatives or have a differentiable
function over a region a little larger than the constraints.
It should be possible to write the finite-difference code only to
step into the region: do you want to do it?
--
Brian D. Ripley, ripley@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._