From: Kyle Baron <*kyleb*>

Date: Tue, 11 Feb 2020 10:58:51 -0600

Can you please share the ds_sim_told.csv file (or at least 2 complete

individuals from that file)? It does seem like TOLD is the critical thing

here, but I'd like to know what exactly is the discrepancy. IMO we need

the input data to figure that out. mrgsolve does read covariates from the

next record and we have some tests around that. If ADDL isn't involved,

then I'd expect it to behave like any other time-varying covariate. Would

like to look at ALAG too as Leonid suggested.

It does appear that there is no variability in either simulation with

THETA9 and THETA10 fixed to zero.

I have cross-posted this issue on the mrgsolve Issue Tracker. If nmusers

doesn't allow attachments, you can post the input data file there:

https://github.com/metrumresearchgroup/mrgsolve/issues/634

On Tue, Feb 11, 2020 at 10:15 AM Saeheum Song <ss.pkpdmodel

wrote:

*> Pls check what you have compared. You have used sigma 1 for nonmem not fo=
*

r

*> mrgsolve.
*

*>
*

*> Even if you use sigma q for Mrgsolve, the results will be
*

*> slightly different due to fittong vs. Simulation via random numbers.
*

*>
*

*> Hope it helps
*

*>
*

*>
*

*> On Tue, Feb 11, 2020, 10:43 AM Le Louedec Felicien <
*

*> LeLouedec.Felicien *

*>
*

*>> Please find below the code for NONMEM analysis and for mrgsolve which is
*

*>> the package I use to perform simulations in R
*

*>>
*

*>> Thanks you very much
*

*>>
*

*>> Félicien
*

*>>
*

*>> ;;;;;NONMEM CODE;;;
*

*>>
*

*>> $PROBLEM TEST F DECREASE
*

*>> $INPUT ID TIME EVID AMT CMT DV MDV TOLD
*

*>> $DATA ds_sim_told.csv IGNORE= *

*>> $SUBROUTINES ADVAN13 TOL=4
*

*>> $MODEL COMP=(DEPOT) COMP=(CENTRAL) COMP=(PERIPH)
*

*>>
*

*>> $PK
*

*>> TVCL = THETA(1)
*

*>> TVVC = THETA(2)
*

*>> TVKA = THETA(3)
*

*>> TVALAG1 = THETA(4)
*

*>> TVQ = THETA(5)
*

*>> TVVP = THETA(6)
*

*>> TVLAMBDA = THETA(7)
*

*>> TVMAXDECR = THETA(8)
*

*>> ERRADD = THETA(9)
*

*>> ERRPROP = THETA(10)
*

*>>
*

*>> CL = TVCL
*

*>> VC = TVVC
*

*>> KA = TVKA
*

*>> ALAG1 = TVALAG1
*

*>> Q = TVQ
*

*>> VP = TVVP
*

*>>
*

*>> LAMBDA = TVLAMBDA / 24
*

*>> MAXDECR= TVMAXDECR
*

*>> TVF= 1-MAXDECR+MAXDECR*EXP(-LAMBDA*TOLD)
*

*>> F1 = TVF
*

*>>
*

*>> K20 = CL/VC
*

*>> K23 = Q/VC
*

*>> K32 = Q/VP
*

*>> S2 = VC
*

*>>
*

*>> $DES
*

*>> DADT(1) = - KA * A(1)
*

*>> DADT(2) = KA * A(1) - K20*A(2) - K23*A(2) + K32*A(3)
*

*>> DADT(3) = K23* A(2) - K32*A(3)
*

*>>
*

*>> $ERROR
*

*>> IPRED=F
*

*>> W=SQRT(ERRADD**2+(ERRPROP*IPRED)**2)
*

*>> Y=IPRED+W*EPS(1)
*

*>> IRES=DV-IPRED
*

*>> IWRES=IRES/(W+0.001)
*

*>>
*

*>> $THETA
*

*>> (0, 0.5) FIX ; 1 CL
*

*>> (0, 3) FIX ; 2 VC
*

*>> (0, 0.1) FIX ; 3 KA
*

*>> (0, 1) FIX ; 4 ALAG
*

*>> (0, 1) FIX ; 5 Q
*

*>> (0, 25) FIX ; 6 VP
*

*>> (0, 0.15) FIX ; 7 LAMBDA
*

*>> (0, 0.50) FIX ; 8 MAXDECR
*

*>> (0) FIX ; 9 ADD
*

*>> (0) FIX ; 10 PROP
*

*>>
*

*>> $OMEGA 0 FIX
*

*>> $SIGMA 1 FIX
*

*>>
*

*>> $ESTIMATION METHOD=1 INTER NOABORT MAXEVAL=0 SIG=3 PRINT=5 POSTH=
*

OC

*>> FORMAT= s1PE16.8E3
*

*>> $COV PRINT=E MATRIX=S
*

*>> $TABLE ID TIME EVID AMT CMT DV MDV TOLD F1 PRED IPRED IWRES IRES
*

*>> ONEHEADER NOPRINT FILE = run301.TAB FORMAT= s1PE16.8E3
*

*>>
*

*>> ;;;; end of NONMEM CODE ;;;;;
*

*>>
*

*>> ;;;; MRGSOLVE CODE ;;;;;
*

*>> $PROB test F decrease
*

*>>
*

*>> $PARAM *

*>> TVCL : 0.5 : 1 Clearance (L.h-1)
*

*>> TVVC : 3 : 2 Volume (L)
*

*>> TVKA : 0.1 : 3 Absorption rate constant (h-1)
*

*>> TVALAG : 1 : 5 Lag time (h)
*

*>> TVQ : 1 : 6 Intercompartmental Clearance (L.h-1)
*

*>> TVVP : 25 : 7 Volume (L)
*

*>> TVLAMBDA : 0.15 : 8 First-order decay constant (day-1)
*

*>> TVMAXDECR: 0.50 : 9 Magnitude of decrease constant (%)
*

*>>
*

*>> TOLD : 0 : default TOLD
*

*>>
*

*>> $CMT *

*>> DEPOT : Depot compartment
*

*>> CENTRAL : Central compartment
*

*>> PERIPHERAL : Peripheral compartment
*

*>>
*

*>> $GLOBAL
*

*>> double CL, VC, KA, ALAG, Q, VP, LAMBDA, MAXDECR, TVF, K20, K23, K32, F1 =
*

;

*>>
*

*>> $TABLE
*

*>> double DV = (CENTRAL / VC) ;
*

*>>
*

*>> $MAIN
*

*>> CL = TVCL ;
*

*>> VC = TVVC ;
*

*>> KA = TVKA ;
*

*>> ALAG = TVALAG ;
*

*>> Q = TVQ ;
*

*>> VP = TVVP ;
*

*>> LAMBDA = TVLAMBDA / 24 ;
*

*>> MAXDECR = TVMAXDECR ;
*

*>>
*

*>> TVF = 1 - MAXDECR + MAXDECR * exp(-LAMBDA*TOLD) ;
*

*>> F1 = TVF ;
*

*>>
*

*>> K20 = CL / VC ;
*

*>> K23 = Q / VC ;
*

*>> K32 = Q / VP ;
*

*>>
*

*>> F_DEPOT = F1 ;
*

*>> ALAG_DEPOT = ALAG ;
*

*>>
*

*>> $ODE
*

*>> dxdt_DEPOT = -KA * DEPOT ;
*

*>> dxdt_CENTRAL = KA * DEPOT - K20 * CENTRAL - K23 * CENTRAL + K32 *
*

*>> PERIPHERAL ;
*

*>> dxdt_PERIPHERAL = K23 * CENTRAL - K32 * PERIPHERAL;
*

*>>
*

*>> $CAPTURE *

*>> DV : Concentration central (mcg/L)
*

*>> F_DEPOT : F
*

*>>
*

*>> ;;;; end of MRGSOLVE CODE ;;;;
*

*>>
*

*>>
*

*>>
*

*>>
*

*>>
*

*>>
*

*>>
*

*>> -----Message d'origine-----
*

*>> De : owner-nmusers *

*>> De la part de Leonid Gibiansky
*

*>> Envoyé : mardi 11 février 2020 15:19
*

*>> À : nmusers *

*>> Objet : Re: [NMusers] Time-varying bioavailability and reproducibility i=
*

n

*>> NONMEM analysis
*

*>>
*

*>> could you show equations? Bioavailability is treated differently in
*

*>> Nonmem and R, so code should reflect it.
*

*>> Thanks
*

*>> Leonid
*

*>>
*

*>>
*

*>> On 2/11/2020 3:52 AM, Le Louedec Felicien wrote:
*

*>> > Dear NONMEM users,
*

*>> >
*

*>> > I'm struggling for a couple of weeks against contradictory results
*

*>> > between NONMEM and R analysis of the same data with the same model
*

*>> which
*

*>> > includes a time-varying bioavailability. Here is a simplified example
*

*>> of
*

*>> > my issue:
*

*>> >
*

*>> > On the one hand, let's introduce a bicompartmental model with a depot
*

*>> > compartment, where bioavailability is decreasing over time given a
*

*>> > maximum in decrease (MAXDECR) and a first-order decay constant
*

*>> (LAMBDA).
*

*>> > Instead of the variable TIME, I use a covariate TOLD (Time Of Last
*

*>> Dose)
*

*>> > in order to be sure that the value of F1 computed by NONMEM will be
*

*>> > independent of the time used for computation:
*

*>> >
*

*>> > ---
*

*>> >
*

*>> > $INPUT CID TIME EVID AMT CMT DV MDV TOLD
*

*>> >
*

*>> > $MODEL COMP=(DEPOT) COMP=(CENTRAL) COMP=(PERIPH)
*

*>> >
*

*>> > $PK
*

*>> >
*

*>> > MAXDECR = THETA(1)
*

*>> >
*

*>> > LAMBDA = THETA(2) / 24 ; TIME is in hour, Lambda in day-1
*

*>> >
*

*>> > F1 = 1 - MAXDECR + MAXDECR * EXP(-LAMBDA * TOLD)
*

*>> >
*

*>> > $THETA
*

*>> >
*

*>> > (0, 0.5, 1) FIX
*

*>> >
*

*>> > (0, 0.15 ) FIX
*

*>> >
*

*>> > ---
*

*>> >
*

*>> > On the other hand, we have a dataset of 28 IDs with:
*

*>> >
*

*>> > -the same dosing regimen of 400 mg qd for 28 days (one line with EVID=
*

=1

*>> > per administration, no ADDL).
*

*>> >
*

*>> > -different "sampling occasions" at 0h, 6h, 12 and 18h post-dose; at da=
*

y

*>> > 1 for ID1, at day 1&2 for ID2, at day 1&2&3 for ID3, and so on until
*

*>> > ID28 who has a complete PK exploration from day 1 to 28. All these
*

*>> lines
*

*>> > are filled with EVID=0, DV=., and MDV=1.
*

*>> >
*

*>> > Then, I estimate these concentrations in maximum a posteriori Bayesian
*

*>> > manner (MAXEVAL = 0) with ADVAN 13 (there is no inter-individual nor
*

*>> > residual variability).
*

*>> >
*

*>> > My problem is that NONMEM found different concentrations in these 28
*

*>> > individuals, even though they received the same dose. Besides, as
*

*>> > excepted, I found that all individuals had the same value for F1 (at a
*

*>> > given time point).
*

*>> >
*

*>> > Would any of you have an idea of why NONMEM does not return the same
*

*>> > predictions ?
*

*>> >
*

*>> > Thank you very much in advance
*

*>> >
*

*>> > Kind regards
*

*>> >
*

*>> > Félicien LE LOUEDEC, PharmD
*

*>> >
*

*>> > PhD student
*

*>> >
*

*>> > Centre de Recherches en Cancérologie de Toulouse (CRCT), Toulouse=
*

,

*>> FRANCE
*

*>> >
*

*>> > Team 14: « Dose Individualization of Anticancer Drugs »
*

*>> >
*

*>> > +335 31 15 55 69
*

*>> >
*

*>> > Lelouedec.felicien *

*>> > <mailto:Lelouedec.felicien *

*>> >
*

*>>
*

*>>
*

*>>
*

*>>
*

*>>
*

--

Kyle Baron | Principal Scientist I

Metrum Research Group

2 Tunxis Road | Tariffville, CT 06081

p: 860-735-7043 ext. 202 | e: kyleb

Received on Tue Feb 11 2020 - 11:58:51 EST

Date: Tue, 11 Feb 2020 10:58:51 -0600

Can you please share the ds_sim_told.csv file (or at least 2 complete

individuals from that file)? It does seem like TOLD is the critical thing

here, but I'd like to know what exactly is the discrepancy. IMO we need

the input data to figure that out. mrgsolve does read covariates from the

next record and we have some tests around that. If ADDL isn't involved,

then I'd expect it to behave like any other time-varying covariate. Would

like to look at ALAG too as Leonid suggested.

It does appear that there is no variability in either simulation with

THETA9 and THETA10 fixed to zero.

I have cross-posted this issue on the mrgsolve Issue Tracker. If nmusers

doesn't allow attachments, you can post the input data file there:

https://github.com/metrumresearchgroup/mrgsolve/issues/634

On Tue, Feb 11, 2020 at 10:15 AM Saeheum Song <ss.pkpdmodel

wrote:

r

OC

;

n

=1

y

,

--

Kyle Baron | Principal Scientist I

Metrum Research Group

2 Tunxis Road | Tariffville, CT 06081

p: 860-735-7043 ext. 202 | e: kyleb

Received on Tue Feb 11 2020 - 11:58:51 EST