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
Warning obtained while running SAEM
4 messages
4 people
Latest: Mar 05, 2024
Dear Tim,
Have you tried to run model 1 (with SQRT) also using $ABBREV PROTECT? The error may occur because of a numeric error that propagates through the SAEM steps.
Jeroen
http://pd-value.com
[email protected]
@PD_value
+31 6 23118438
-- More value out of your data!
Quoted reply history
On 05-03-2024 14:08, T. Preijers wrote:
> 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
Most likely, the parameter was reduced to the internal bound. Nonmem places the low bound equal to 1/100 (or 1/1000) of the initial value even if it is set to zero in the code. You may rerun with lower value of THETA(2) or put NOSIGMABOUND to the estimation record
Leonid
THETABOUNDTEST, OMEGABOUNDTEST, SIGMABOUNDTEST
With NONMEM VI, the estimation step sometimes terminates with the
message
PARAMETER ESTIMATE IS NEAR ITS DEFAULT BOUNDARY.
These options request that the "default boundary test" be per-
formed for THETA, OMEGA, and SIGMA, respectively. THETABOUNDTEST
may also be coded TBT or TBOUNDTEST; OMEGABOUNDTEST may also be
coded OBT or OBOUNDTEST; SIGMABOUNDTEST may also be coded SBT or
SBOUNDTEST. These options are the defaults.
NOTHETABOUNDTEST, NOOMEGABOUNDTEST, NOSIGMABOUNDTEST
Instructs NONMEM to omit the "default boundary test" for this
type of variable, i.e., to behave like NONMEM V in this regard.
Any option listed above may be preceded by "NO". The THETA,
OMEGA, and SIGMA choices are independent of each other. E.g., it
is possible to specify NOOBT (to prevent the "default OMEGA
boundary test") and permit both the "default THETA boundary test"
and "default SIGMA boundary test".
Quoted reply history
On 3/5/2024 8:08 AM, T. Preijers wrote:
> 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
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