RE: Warning obtained while running SAEM
Hi Tim,
Are you getting a zero gradient for TH2 on the 0-th iteration? If so, this may
be indicative of a coding error. You might check to make sure that THETA(2) is
not being assigned to another parameter (say a fixed effect parameter) in
addition to the standard deviation for the additive residual error. Note that
it is the variances of the proportional and additive residual errors that can
be summed for two independent random effects and not the standard deviations.
So, adding the proportional and additive standard deviations in the
specification of W:
W = THETA(1) * IPRED + THETA(2)
is not correct.
If the gradient for TH2 is not zero on the 0-th iteration and you don’t find
any coding errors involving say multiple assignments for TH2, but the gradient
goes to zero after several iterations, this might mean you don’t have rich
enough information to estimate the additive error component. If so, try fixing
TH2 to 0 and just estimate the proportional error component. Make sure that
you are not including any DVs (e.g., the predose sample at TIME=0) where
IPRED=0 in the estimation since the proportional error is 0 and hence IWRES is
undefined.
Regards,
Ken
Kenneth G. Kowalski
President
Kowalski PMetrics Consulting, LLC
Email: [email protected] <mailto:[email protected]>
Cell: 248-207-5082
Quoted reply history
From: [email protected] <[email protected]> On Behalf Of
T. Preijers
Sent: Tuesday, March 5, 2024 8:09 AM
To: [email protected]
Subject: [NMusers] Warning obtained while running SAEM
Dear NMusers,
While running a simple 1-comp model in NONMEM using SAEM, we discovered a
warning resulting from $ERROR. Using a SQRT( **2) describing a mixed error
model resulted in zero gradients for the additive error (see Example error
model 1 below).
Example error model 1
$ERROR
IPRED = F
IRES = DV-IPRED
W = SQRT(THETA(1)**2 * IPRED**2 + THETA(2)**2)
IF (W.EQ.0) W = 1
IWRES = IRES/W
Y = IPRED+W*ERR(1)
However, when simplifying the $ERROR code omitting the use of SQRT() and
THETA(x)**2 (see Example error model 2 below), a successful SAEM run was
obtained.
Example error model 2
$ERROR
IPRED = F
IRES = DV-IPRED
W = THETA(1) * IPRED + THETA(2)
IF (W.EQ.0) W = 1
IWRES = IRES/W
Y = IPRED + W*ERR(1)
Initial values for both THETAs were positive (TH1: 0.417, TH2: 0.545) and
constrained with a lower boundary of 0. Moreover, the expected values for IPRED
were ranged from 1-700 mg/L.
Our interest lies in what has driven this error. Perhaps someone else has
encountered this before?
Looking forward to receiving any answers/comments!
Kind regards,
Dr. T. Preijers, PharmD, PhD
Hospital Pharmacist and Clinical Pharmacologist
Hospital Pharmacy Erasmus MC Rotterdam The Netherlands
Rotterdam Clinical Pharmacometrics Group