MxConstraint Problem
Posted on
carey
Joined: 10/19/2009
Forums
(1) ran three models: the first a "general model", the second and third models constrained a (1 x 4) vector of means for one group to equal the (1 x 4) vector of means for another group. the second model did this using an MxAlgebra object while the third used an MxConstraint object.
(2) all models converged with an NPSOL inform value of 0.
(3) gradient and hessian were perfectly fine for models 1 and 2 but not for model 3. largest gradient element was -40 and the norm of the gradient was 5900. the search direction at convergence (inverse(hess) %*% gradient) gave very large elements. the calculated hessian was a (1 x 1) matrix with element NA.
(4) yet, the second and third models gave the same function value and the same parameter estimates.
(5) suspect something funky with the gradient and/or hessian returned with the third model.
(2) all models converged with an NPSOL inform value of 0.
(3) gradient and hessian were perfectly fine for models 1 and 2 but not for model 3. largest gradient element was -40 and the norm of the gradient was 5900. the search direction at convergence (inverse(hess) %*% gradient) gave very large elements. the calculated hessian was a (1 x 1) matrix with element NA.
(4) yet, the second and third models gave the same function value and the same parameter estimates.
(5) suspect something funky with the gradient and/or hessian returned with the third model.
belatedly, noticed that i could not attach a *.zip file. go to
http://psych.colorado.edu/~carey/OpenMxGUI/ConstraintProblem.php
to download the R objects.
greg
The hessian returned in he
ryne
Log in or register to post comments
In reply to The hessian returned in he by Ryne
Or equality constraints for
Indeed, I think that that the returned approximate ("estimated") hessian in the presence of non-linear constraints is incorrect, and if possible we should fix it. The calculated Hessian is not available because its algorithm doesn't understand constraints either.
Log in or register to post comments
In reply to Or equality constraints for by neale
thanks all, m familiar with
m familiar with these issues about constraints. my purpose was to point out a potential problem with NPSOL and/or OpenMx.
the gradient issue is the most important one. the constraints should NOT influence the gradient's calculation, so getting numbers like 40 instead of .0001 implies an error somewhere.
re the estimated hessian. ask: if this is wrong and the gradient is wrong, then how does NPSOL ever find the correct solution? i rule out divine intervention.
Log in or register to post comments
In reply to thanks all, m familiar with by carey
Agreed, the problem appears
Log in or register to post comments