Constrained optmization numerical hessian

0

Dear All,

I'm using constrained optimization and want to compute a numerical hessian. Did somebody already do this and can maybe point me to some resources or give useful hints. I already tried using CML, which provides a hessia, but the LLF is unfortunately not straightforward (compared to the M-Estimation) and I would need to specify a distribution which I'm not really comfortable with.

best

Oldes

0

There are several functions in the GAUSS Run-Time Library for computing Hessians. If you are using CO, use hessp(&f,x0) to compute your hessian where &f is the pointer to the function used in your call to CO, and the second argument is the vector of parameter estimates returned by CO. For example,

{ x,fmin,g,retcode } = co(&f,x0);
h = hessp(&f,x);

If you are using COMT, then use hessmt(&f,par,data) where &f is again the pointer to the function used in your call to COMT, par is a PV structure containing the parameter estimates returned by COMT, and data is a DS structure containing any data used by your objective function procedure. For example,

struct comtResults out;
out = comt(&f,par,d0,c0);
h = hessmt(&f,out.par,d0);

0

Be advised that if any of your parameters are on a constraint boundary, then the inverse of the Hessian is not the correct covariance matrix of the parameters. The correct "approximate" covariance matrix calculation is described in the CMLMT Manual in Section 2.9.1. This covariance matrix is itself not completely correct and for that reason is called approximate. The correct procedure for models with constrained parameters is hypothesis testing. The method is described in Section 2.9.3 of the CMLMT Manual. Functions for the calculations of the test of the hypothesis can be found in the file hypotest.src in the Run-Time Library. Instructions for the calculations can be found at the top of that file.

0

Do I see correctly, that the hessian is already multiplied by -1, and therefore it is the inverse that is the variance-covariance matrix and not the negative of the inverse?

0

If your objective function is a log-likelihood then you are minimizing -logl and thus the Hessian is already multiplied by -1 and its inverse is the variance-covariance matrix.

0

There are several functions in the GAUSS Run-Time Library for computing Hessians. If you are using CO, use hessp(&f,x0) to compute your hessian where &f is the pointer to the function used in your call to CO, and the second argument is the vector of parameter estimates returned by CO. For example,

{ x,fmin,g,retcode } = co(&f,x0);
h = hessp(&f,x);

If you are using COMT, then use hessmt(&f,par,data) where &f is again the pointer to the function used in your call to COMT, par is a PV structure containing the parameter estimates returned by COMT, and data is a DS structure containing any data used by your objective function procedure. For example,

struct comtResults out;
out = comt(&f,par,d0,c0);
h = hessmt(&f,out.par,d0);

0

Be advised that if any of your parameters are on a constraint boundary, then the inverse of the Hessian is not the correct covariance matrix of the parameters. The correct "approximate" covariance matrix calculation is described in the CMLMT Manual in Section 2.9.1. This covariance matrix is itself not completely correct and for that reason is called approximate. The correct procedure for models with constrained parameters is hypothesis testing. The method is described in Section 2.9.3 of the CMLMT Manual. Functions for the calculations of the test of the hypothesis can be found in the file hypotest.src in the Run-Time Library. Instructions for the calculations can be found at the top of that file.

0

Do I see correctly, that the hessian is already multiplied by -1, and therefore it is the inverse that is the variance-covariance matrix and not the negative of the inverse?

0

If your objective function is a log-likelihood then you are minimizing -logl and thus the Hessian is already multiplied by -1 and its inverse is the variance-covariance matrix.

• Aptech Systems, Inc. Worldwide Headquarters

Aptech Systems, Inc.
2350 East Germann Road, Suite #21
Chandler, AZ 85286

Phone: 360.886.7100
FAX: 360.886.8922

• Training & Events

Want more guidance while learning about the full functionality of GAUSS and its capabilities? Get in touch for in-person training or browse additional references below.

• Tutorials

Step-by-step, informative lessons for those who want to dive into GAUSS and achieve their goals, fast.

• Want to find out more?

Get a real answer from a real person

• Have a Specific Question?

Get a real answer from a real person

• Need Support?
• Support Plans

Premier Support and Platinum Premier Support are annually renewable membership programs that provide you with important benefits including technical support, product maintenance, and substantial cost-saving features for your GAUSS System or the GAUSS Engine.

• User Forums

Join our community to see why our users are considered some of the most active and helpful in the industry!