NONMEM Users Network Archive

Hosted by Cognigen

RE: [NMusers] Strange PRED prediction in SAEM with M3 BQL handling

From: Bauer, Robert <>
Date: Fri, 22 Feb 2019 15:44:45 +0000

Normally, the NONMEM reserved variable PRED will be automatically calculated for the user when the data is the typical normally distributed type. However, when data are modeled with a user specified likelihood (F_FLAG>0), the PRED value will be set to an uninformative value. To get around this,

In $ERROR block, right after you define IPRED, insert


and add PREDV as one of your table items. During COMACT=1, your model will be evaluated at ETA=0, and you can use that to pick out IPRED evaluated at ETA=0, which is equivalent to the normal meaning of PRED.

Robert J. Bauer, Ph.D.
Senior Director
Pharmacometrics R&D
ICON Early Phase
820 W. Diamond Avenue
Suite 100
Gaithersburg, MD 20878
Office: (215) 616-6428
Mobile: (925) 286-0769<><>

From: [] On Behalf Of Andrew Tse
Sent: Friday, February 22, 2019 1:23 AM
Subject: [NMusers] Strange PRED prediction in SAEM with M3 BQL handling

Dear all,

I am running SAEM with M3 BQL handling method via PsN but having some strange PRED values in mytab table if someone can shed some light:
I have tried using FOCE (excluding BQL data) & SAEM (excluding BQL data) both have normal looking fitting with data in individual plots.
Once I have coded SAEM with M3 codes and include BQL data it showed very strange PRED vs time plots (eg. 100 times over prediction at BQL time point). IPRED had normal results.

Here are the control stream that I have used:




 K23=Q/V2 ;Distribution rate constant
K32=Q/V3 ;Distribution rate constant


DADT(1)= -KA*A(1)
DADT(2)= -CL*A(2)/V2-K23*A(2)+K32*A(3)
DADT(3)= K23*A(2)-K32*A(3)



IF (LIMI.EQ.1) LIM= 0.05 ;BATCH 1
IF (LIMI.EQ.2) LIM= 0.01 ;BATCH 2
IF (LIMI.EQ.3) LIM= 0.025 ;BATCH 3

F_FLAG=1 ;BQL so Y is likelihood

My question is that whether there is error in my M3 $ERROR model? or whether PRED values for BQL means something else other than prediction for BQL data?

Thanks a lot.

Kind regards,
Andrew Tse

Research Pharmacist
<br /><br />
ICON plc made the following annotations.
This e-mail transmission may contain confidential or legally privileged information that is intended only for the individual or entity named in the e-mail address. If you
are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or reliance upon the contents of this e-mail is strictly prohibited. If
you have received this e-mail transmission in error, please reply to the sender, so that ICON plc can arrange for proper delivery, and then please delete the message.

Thank You,

ICON plc
South County Business Park
Dublin 18
Registered number: 145835

Received on Fri Feb 22 2019 - 10:44:45 EST

The NONMEM Users Network is maintained by ICON plc. Requests to subscribe to the network should be sent to: Once subscribed, you may contribute to the discussion by emailing: