Hi Leonid,

 

Since coding   

 

W = THETA(1) * IPRED + THETA(2)

 

corresponds to implicitly forcing the covariance to be THETA(1)*IPRED*THETA(2) 
then this essentially assumes that there is perfect correlation between the 
proportional and additive random effects.  That is, CORR(ERR(1), ERR(2)) = 1.  
I wouldn’t want to go with this expression for W without first at least 
attempting to estimate the covariance using the $SIGMA BLOCK(2) formulation I 
suggest below and allow the two residual error random effects to not be 
perfectly correlated.  If the estimate of the correlation is near 1 then 
reducing the $SIGMA structure using the above expression for W might be 
reasonable from the standpoint of parsimony.

 

Ken

 

From: kgkowalsk...@gmail.com <kgkowalsk...@gmail.com> 
Sent: Tuesday, March 5, 2024 5:05 PM
To: 'Leonid Gibiansky' <lgibian...@quantpharm.com>; 'T. Preijers' 
<t.preij...@gmail.com>; nmusers@globomaxnm.com
Subject: RE: [NMusers] Warning obtained while running SAEM

 

Oops see correction to the $SIGMA BLOCK(2) labeling below:

-----Original Message-----
From: kgkowalsk...@gmail.com <mailto:kgkowalsk...@gmail.com>  
<kgkowalsk...@gmail.com <mailto:kgkowalsk...@gmail.com> >
Sent: Tuesday, March 5, 2024 4:56 PM
To: 'Leonid Gibiansky' <lgibian...@quantpharm.com 
<mailto:lgibian...@quantpharm.com> >; 'T. Preijers' <t.preij...@gmail.com 
<mailto:t.preij...@gmail.com> >; nmusers@globomaxnm.com 
<mailto:nmusers@globomaxnm.com> 
Subject: RE: [NMusers] Warning obtained while running SAEM

Hi Leonid,

I see.  Normally we think of the proportional and additive random effects as 
being independent of each other.  For example, we could code the residual error 
as:

THETA(1)*IPRED*ERR(1) + THETA(2)*ERR(2)  

where 

$SIGMA DIAGONAL(2)

1 FIXED

1 FIXED

which is equivalent to:

W = SQRT(THETA(1)**2 * IPRED**2 + THETA(2)**2) with the residual error coded as:

W*ERR(1)

where

$SIGMA DIAGONAL(1)

1 FIXED

By coding W = THETA(1) * IPRED + THETA(2) with the residual error coded as 
W*ERR(1) we are implicitly assuming that the two components are correlated with 
a covariance corresponding to THETA(1)*IPRED*THETA(2).  I did not know that 
this is what Monolix does.  This provides a very specific covariance structure 
and I wonder how it would compare to a residual error model with

IPRED*ERR(1) + ERR(2)

where

$SIGMA BLOCK(2)

 xxx            ;Var(ERR(1))

 xxx    xxx      ;Cov(ERR(1), ERR(2)) Var(ERR(2))

It seems to me that it would be better to explicitly model this covariance as 
an additional parameter to directly estimate the covariance rather than assume 
it corresponds to THETA(1)*IPRED*THETA(2) with no additional parameters.  What 
do you think?  Do you have any experience coding the residual error using the W 
= THETA(1) * IPRED + THETA(2) expression?

BTW,  I still think Tim should check to see if the gradient for THETA(2) is 0 
right from the start with the 0-th iteration as this probably means there is a 
coding error somewhere.

Ken  

  

 

-----Original Message-----

From: Leonid Gibiansky < <mailto:lgibian...@quantpharm.com> 
lgibian...@quantpharm.com>

Sent: Tuesday, March 5, 2024 1:42 PM

To:  <mailto:kgkowalsk...@gmail.com> kgkowalsk...@gmail.com; 'T. Preijers' < 
<mailto:t.preij...@gmail.com> t.preij...@gmail.com>;  
<mailto:nmusers@globomaxnm.com> nmusers@globomaxnm.com

Subject: Re: [NMusers] Warning obtained while running SAEM

Hi Tim and Ken,

I do not think this is an error to code W = THETA(1) * IPRED + THETA(2). 

This does not correspond to the variance of

      VAR1=(THETA(1)*IPRED)^2+THETA(2)^2

but this is just a different dependence of variance

    VAR2=(THETA(1)*IPRED+THETA(2))^2 = VAR1+2*THETA(1)*IPRED*THETA(2) on IPRED. 
I think this is a default way of coding in Monolix (not 100% sure as I do not 
use it).

Also, with regards to the previous post, we need to make sure that variance of 
EPS1 is fixed to 1 if we use this code.

Regards,

Leonid

 

On 3/5/2024 11:25 AM,  <mailto:kgkowalsk...@gmail.com> kgkowalsk...@gmail.com 
wrote:

> 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:  <mailto:kgkowalsk...@gmail.com> kgkowalsk...@gmail.com < 
> <mailto:kgkowalsk...@gmail.com> mailto:kgkowalsk...@gmail.com>

> 

> Cell:  248-207-5082

> 

> *From:*owner-nmus...@globomaxnm.com < <mailto:owner-nmus...@globomaxnm.com> 
> owner-nmus...@globomaxnm.com> *On 

> Behalf Of *T. Preijers

> *Sent:* Tuesday, March 5, 2024 8:09 AM

> *To:*  <mailto:nmusers@globomaxnm.com> nmusers@globomaxnm.com

> *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

> 

Reply via email to