Re: [NMusers] Estimation method for ETAs with POSTHOC

From: Ruben Faelens <>
Date: Fri, 05 May 2017 14:48:06 +0000

Dear Tingjie,

Your proposed objective function is based on least-squares distance. You
could also use the actual probability density:
objFunction = LOG(pnorm(Yobs - Ypred, sigma)) + LOG(pnorm(Para_i-Para_pop=
This allows more flexibility wrt parameter or residual variability

I have previously implemented the above using the optim() function (with
Nelder-Mead method).

In my experience, the tricky part is making the prediction function robust.
Almost all optimization methods will evaluate widely varying values for the
parameters and expect a continuous OFV.
If you encounter numerical problems, you can always visualize the OFV to
gain a better understanding.

Finally, if you use this for dose recommendation, do not forget to evaluate
the uncertainty around the individual estimates! If you use an objective
function based on the actual log-likelihood, this is easy:
myHessian <- hessian(objFunction, etaEstimates)
FIM <- -1 * myHessian # Officially E(Hessian), but not necessary when using
numeric methods
myCovMatrix <- solve(FIM)

Good luck!

Kind regards,
Ruben Faelens

On Fri, May 5, 2017 at 2:17 PM Guo, Tingjie <> wrote:

> Dear NMusers,
> I have two questions about the mathematical details on POSTHOC estimation
> in NONMEM. How does NONMEM actually do when doing POSTHOC ($EST METHOD==
> MAXEVEL=0) to get ETAs? I assume but not for sure there is an objective
> function to be minimized, somewhat like:
> Objective function = SUM(Yobs-Ypred)^2/sigma^2 +
> SUM(Para_i-Para_pop)^2/omega^2
> Is there an objective function used in NONMEM when doing POSTHOC? If so,
> what is that function?
> Secondly, if the answer to above is yes, let’s assume the real ob=
> function is the same as what I mentioned above. I wonder how (NONMEM does=
> to minimize this function? I am currently trying to do similar things in
> R/Python language. I tried Metropolis-Hasting algorithm and Simulated
> Annealing algorithm, but with some technical problems. And the result was
> not comparable with NONMEM as well. Can someone give me a direction for
> this? The more mathematically detailed the better.
> Thanks!
> Warm regards,
> Tingjie

Received on Fri May 05 2017 - 10:48:06 EDT

This archive was generated by hypermail 2.3.0 : Fri Sep 27 2019 - 16:54:56 EDT