How can I find and store my final hessian?

User ForumHow can I find and store my final hessian?
admin Staff asked 4 years ago

How can I find and store my final hessian in CMLMT and MaxLikMT?

1 Answers
Best Answer
admin Staff answered 4 years ago

To find and store the final Hessian.  In Constrained Maximum Likelihood MT (CMLMT), it will be found in the results structure:

   struct cmlmtResults out;
   out = cmlmt(&lnlk,p0,d0,c0);
   h = out.hessian;
   save h;

And similarly in Maximum Likelihood MT (Maxlikmt)

   struct maxlikmtResults out;
   out = maxlikmt(&lnlk,p0,d0,c0);
   h = out.hessian;
   save h;

The final Hessian is found in a global variable for Constrained Maximum Likelihood (CML) and for Maximum Likelihood (Maxlik)

   h = _cml_finalHess;
   h = _max_finalHess;