# How can I find and store my final hessian?

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

0

accepted

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;```

47

0
accepted

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;```