Hi,
I'm trying to implement an absorption lag-time into a model described by
differential equations and using an empirical input function.
My initial idea was to define a MTIME(1) corresponding to the lag-time and to
use MPAST(1) to set the start of the input as below.
DADT(1)=(DOSE/V)*INPUT*MPAST(1)-K*A(1)
However, I only end up with no input at all in the system resulting in
simulated DV of 0 ± residual error. The issue seems related to the use MPAST
with the input function but I don't know how.
Would anyone be kind enough to point me in the right direction?
Thanks,
Pierre-Olivier
lagged absorption and empirical input function
10 messages
7 people
Latest: Jul 29, 2011
Pierre-Olivier,
NONMEM takes care of all inputs via the structure of dosing records in
the input dataset. Therefore, they are not included in the $DES block.
Instead:
In the input dataset
ID TIME AMT DV etc.
1 0 100 .
1 1 . 5
etc.
$PK
ALAG1=THETA(#) ;this will be the estimate of the absorption lag
S1=1/V
etc.
$DES
;note NONMEM codes diff. eqs. in amount units. The scale parameter (S1)
;in $PK is used to convert the amount (AMT) unit to the DV (or conc.)
;unit
;NONMEM will insert the dose of 100 at the TIME of the dose in the
;dataset + ALAG1. The input will remain zero until that time automatically.
DADT(1)=-K*A(1)
----------------
If you are fitting a basic 1 cmt model with first-order elimination, I
would recommend using subroutine ADVAN1 TRANS1. You don't provide $DES
for this model. You just supply $PK.
$PK
K=THETA(1)
V=THETA(2)
ALAG1=THETA(3)
S1=1/V ;or whatever is appropriate for your units of dose,v,and dv.
-------------
Best Regards,
Luann Phillips
Director, PK/PD
Cognigen Corporation
Tremblay, Pierre-Olivier wrote:
> Hi,
>
> I'm trying to implement an absorption lag-time into a model described by
> differential equations and using an empirical input function.
>
> My initial idea was to define a MTIME(1) corresponding to the lag-time
> and to use MPAST(1) to set the start of the input as below.
>
> DADT(1)=(DOSE/V)*INPUT*MPAST(1)-K*A(1)
>
> However, I only end up with no input at all in the system resulting in
> simulated DV of 0 residual error. The issue seems related to the use
> MPAST with the input function but I don't know how.
>
> Would anyone be kind enough to point me in the right direction?
>
> Thanks,
>
> Pierre-Olivier
>
Pierre-Olivier,
NONMEM takes care of all inputs via the structure of dosing records in the input dataset. Therefore, they are not included in the $DES block.
Instead:
In the input dataset
ID TIME AMT DV etc.
1 0 100 .
1 1 . 5
etc.
$PK
ALAG1=THETA(#) ;this will be the estimate of the absorption lag
S1=1/V
etc.
$DES
;note NONMEM codes diff. eqs. in amount units. The scale parameter (S1) ;in $PK is used to convert the amount (AMT) unit to the DV (or conc.) ;unit ;NONMEM will insert the dose of 100 at the TIME of the dose in the ;dataset + ALAG1. The input will remain zero until that time automatically.
DADT(1)=-K*A(1)
----------------
If you are fitting a basic 1 cmt model with first-order elimination, I would recommend using subroutine ADVAN1 TRANS1. You don't provide $DES for this model. You just supply $PK.
$PK
K=THETA(1)
V=THETA(2)
ALAG1=THETA(3)
S1=1/V ;or whatever is appropriate for your units of dose,v,and dv.
-------------
Best Regards,
Luann Phillips
Director, PK/PD
Cognigen Corporation
Tremblay, Pierre-Olivier wrote:
> Hi,
>
> I'm trying to implement an absorption lag-time into a model described by differential equations and using an empirical input function.
>
> My initial idea was to define a MTIME(1) corresponding to the lag-time and to use MPAST(1) to set the start of the input as below.
>
> DADT(1)=(DOSE/V)*INPUT*MPAST(1)-K*A(1)
>
> However, I only end up with no input at all in the system resulting in simulated DV of 0 ± residual error. The issue seems related to the use MPAST with the input function but I don't know how.
>
> Would anyone be kind enough to point me in the right direction?
>
> Thanks,
>
> Pierre-Olivier
Thank you Luann and Jan-Stefan for your suggestions. If I understand correctly
you are suggesting I use ADVAN1 or another "pre-coded" ADVAN routine which
precludes the use of the $DES block. In fact, I actually have a reasonnable
fit to my data from a zero-order input (pretty sharp peaks) and with duration
(D1) set as a fixed-effect, using either ADVAN1 or ADVAN5. Obviously, with
these ADVANs, lag-times are a matter of declaring ALAGs (or sometimes using
transit compartments to fit the model to slowly increasing early concentrations
as Jan-Stefan suggested).
However, I deliberately choose to have an empirical p.d.f. (weibull, inverse
gaussian or other) as an input because that will be used in a later IVIVC
modeling and the cumulative density distribution of these functions can be
readily fitted to dissolution data. The thing is this, one of the formulations
I have to work with is enteric-coated, hence the need to model a lag-time.
My problem is that MTIME works perfectly fine with rate constants in
differential equations but apparently not so much with "block" functions, so to
speak. An (more probable) alternative is that the way I use MTIME is wrong.
>From my understanding, coding discontinuous change-events with conditional IF
>statements in a $DES block may not be a very good idea. That's the reason I
>inquired about MTIME as an alternative.
I paste below a larger chunck of my control file so you may see what I mean.
$SUBROUTINE ADVAN6 TOL=6
$MODEL NCOMP=1 COMP=(CENTRAL)
$PK
CV=THETA(1)*EXP(ETA(1))
CV2=CV**2
MDT=THETA(2)*EXP(ETA(2))
K=THETA(3)*EXP(ETA(3))
V=THETA(4)*EXP(ETA(4))
MTIME(1)=THETA(5)+ETA(5)
DOSE=1000000
$DES
P1=2*3.141593*CV2*(T+0.00001)**3
P2=((T+0.00001)-MDT)**2
P3=2*CV2*MDT*(T+0.00001)
P4=SQRT(MDT/P1)
RATIO=-1*(P2/P3)
P5=EXP(RATIO)
IG=P4*P5
INPUT=IG*MPAST(1)
DADT(1)=(DOSE/V)*INPUT-K*A(1)
Thanks again :o)
Pierre-Olivier
-----Message d'origine-----
Quoted reply history
De : Luann Phillips [mailto:[email protected]]
Envoyé : 27 juillet 2011 22:01
À : Tremblay, Pierre-Olivier
Cc : [email protected]
Objet : Re: [NMusers] lagged absorption and empirical input function
Pierre-Olivier,
NONMEM takes care of all inputs via the structure of dosing records in the
input dataset. Therefore, they are not included in the $DES block.
Instead:
In the input dataset
ID TIME AMT DV etc.
1 0 100 .
1 1 . 5
etc.
$PK
ALAG1=THETA(#) ;this will be the estimate of the absorption lag
S1=1/V
etc.
$DES
;note NONMEM codes diff. eqs. in amount units. The scale parameter (S1) ;in $PK
is used to convert the amount (AMT) unit to the DV (or conc.) ;unit ;NONMEM
will insert the dose of 100 at the TIME of the dose in the ;dataset + ALAG1.
The input will remain zero until that time automatically.
DADT(1)=-K*A(1)
----------------
If you are fitting a basic 1 cmt model with first-order elimination, I would
recommend using subroutine ADVAN1 TRANS1. You don't provide $DES for this
model. You just supply $PK.
$PK
K=THETA(1)
V=THETA(2)
ALAG1=THETA(3)
S1=1/V ;or whatever is appropriate for your units of dose,v,and dv.
-------------
Best Regards,
Luann Phillips
Director, PK/PD
Cognigen Corporation
Tremblay, Pierre-Olivier wrote:
> Hi,
>
> I'm trying to implement an absorption lag-time into a model described
> by differential equations and using an empirical input function.
>
> My initial idea was to define a MTIME(1) corresponding to the lag-time
> and to use MPAST(1) to set the start of the input as below.
>
> DADT(1)=(DOSE/V)*INPUT*MPAST(1)-K*A(1)
>
> However, I only end up with no input at all in the system resulting in
> simulated DV of 0 ± residual error. The issue seems related to the
> use MPAST with the input function but I don't know how.
>
> Would anyone be kind enough to point me in the right direction?
>
> Thanks,
>
> Pierre-Olivier
>
Pierre-Olivier
You may use IF() to do it, e.g.,
LAG = THETA()
$DES
T1=T-LAG
INPUT=0
IF(T1.GT.0) INPUT = ; whatever you need expressed as function of T1
DADT(1)=(DOSE/V)*INPUT-K*A(1)
--------------------------------------
Leonid Gibiansky, Ph.D.
President, QuantPharm LLC
web: www.quantpharm.com
e-mail: LGibiansky at quantpharm.com
tel: (301) 767 5566
Quoted reply history
On 7/27/2011 11:10 PM, Tremblay, Pierre-Olivier wrote:
> Thank you Luann and Jan-Stefan for your suggestions. If I understand correctly you are
> suggesting I use ADVAN1 or another "pre-coded" ADVAN routine which precludes
> the use of the $DES block. In fact, I actually have a reasonnable fit to my data from a
> zero-order input (pretty sharp peaks) and with duration (D1) set as a fixed-effect, using
> either ADVAN1 or ADVAN5. Obviously, with these ADVANs, lag-times are a matter of
> declaring ALAGs (or sometimes using transit compartments to fit the model to slowly
> increasing early concentrations as Jan-Stefan suggested).
>
> However, I deliberately choose to have an empirical p.d.f. (weibull, inverse
> gaussian or other) as an input because that will be used in a later IVIVC
> modeling and the cumulative density distribution of these functions can be
> readily fitted to dissolution data. The thing is this, one of the formulations
> I have to work with is enteric-coated, hence the need to model a lag-time.
>
> My problem is that MTIME works perfectly fine with rate constants in differential
> equations but apparently not so much with "block" functions, so to speak. An
> (more probable) alternative is that the way I use MTIME is wrong.
>
> > From my understanding, coding discontinuous change-events with conditional IF
> > statements in a $DES block may not be a very good idea. That's the reason I
> > inquired about MTIME as an alternative.
>
> I paste below a larger chunck of my control file so you may see what I mean.
>
> $SUBROUTINE ADVAN6 TOL=6
> $MODEL NCOMP=1 COMP=(CENTRAL)
> $PK
> CV=THETA(1)*EXP(ETA(1))
> CV2=CV**2
> MDT=THETA(2)*EXP(ETA(2))
> K=THETA(3)*EXP(ETA(3))
> V=THETA(4)*EXP(ETA(4))
> MTIME(1)=THETA(5)+ETA(5)
> DOSE=1000000
> $DES
> P1=2*3.141593*CV2*(T+0.00001)**3
> P2=((T+0.00001)-MDT)**2
> P3=2*CV2*MDT*(T+0.00001)
> P4=SQRT(MDT/P1)
> RATIO=-1*(P2/P3)
> P5=EXP(RATIO)
> IG=P4*P5
> INPUT=IG*MPAST(1)
> DADT(1)=(DOSE/V)*INPUT-K*A(1)
>
> Thanks again :o)
>
> Pierre-Olivier
>
> -----Message d'origine-----
> De : Luann Phillips [mailto:[email protected]]
> Envoyé : 27 juillet 2011 22:01
> À : Tremblay, Pierre-Olivier
> Cc : [email protected]
> Objet : Re: [NMusers] lagged absorption and empirical input function
>
> Pierre-Olivier,
>
> NONMEM takes care of all inputs via the structure of dosing records in the
> input dataset. Therefore, they are not included in the $DES block.
>
> Instead:
>
> In the input dataset
>
> ID TIME AMT DV etc.
> 1 0 100 .
> 1 1 . 5
> etc.
>
> $PK
> ALAG1=THETA(#) ;this will be the estimate of the absorption lag
> S1=1/V
> etc.
>
> $DES
> ;note NONMEM codes diff. eqs. in amount units. The scale parameter (S1) ;in $PK
> is used to convert the amount (AMT) unit to the DV (or conc.) ;unit ;NONMEM
> will insert the dose of 100 at the TIME of the dose in the ;dataset + ALAG1.
> The input will remain zero until that time automatically.
>
> DADT(1)=-K*A(1)
>
> ----------------
>
> If you are fitting a basic 1 cmt model with first-order elimination, I would
> recommend using subroutine ADVAN1 TRANS1. You don't provide $DES for this
> model. You just supply $PK.
>
> $PK
> K=THETA(1)
> V=THETA(2)
> ALAG1=THETA(3)
> S1=1/V ;or whatever is appropriate for your units of dose,v,and dv.
>
> -------------
>
> Best Regards,
>
> Luann Phillips
> Director, PK/PD
> Cognigen Corporation
>
> Tremblay, Pierre-Olivier wrote:
>
> > Hi,
> >
> > I'm trying to implement an absorption lag-time into a model described
> > by differential equations and using an empirical input function.
> >
> > My initial idea was to define a MTIME(1) corresponding to the lag-time
> > and to use MPAST(1) to set the start of the input as below.
> >
> > DADT(1)=(DOSE/V)*INPUT*MPAST(1)-K*A(1)
> >
> > However, I only end up with no input at all in the system resulting in
> > simulated DV of 0 ± residual error. The issue seems related to the
> > use MPAST with the input function but I don't know how.
> >
> > Would anyone be kind enough to point me in the right direction?
> >
> > Thanks,
> >
> > Pierre-Olivier
Dear Pierre-Olivier,
I think once you defined ALAG(1)=THETA() (as Luann suggested), the system will
delay your input. You don't have to specify anything in the $DES block. It's
worth trying.
$PK
ALAG(1)=THETA()
$DES
DADT(1)=(DOSE/V)*INPUT-K*A(1)
Best regards,
Xiao (Shelley)
Quoted reply history
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Tremblay, Pierre-Olivier
Sent: Wednesday, July 27, 2011 11:10 PM
To: Luann Phillips
Cc: [email protected]
Subject: RE: [NMusers] lagged absorption and empirical input function
Thank you Luann and Jan-Stefan for your suggestions. If I understand correctly
you are suggesting I use ADVAN1 or another "pre-coded" ADVAN routine which
precludes the use of the $DES block. In fact, I actually have a reasonnable
fit to my data from a zero-order input (pretty sharp peaks) and with duration
(D1) set as a fixed-effect, using either ADVAN1 or ADVAN5. Obviously, with
these ADVANs, lag-times are a matter of declaring ALAGs (or sometimes using
transit compartments to fit the model to slowly increasing early concentrations
as Jan-Stefan suggested).
However, I deliberately choose to have an empirical p.d.f. (weibull, inverse
gaussian or other) as an input because that will be used in a later IVIVC
modeling and the cumulative density distribution of these functions can be
readily fitted to dissolution data. The thing is this, one of the formulations
I have to work with is enteric-coated, hence the need to model a lag-time.
My problem is that MTIME works perfectly fine with rate constants in
differential equations but apparently not so much with "block" functions, so to
speak. An (more probable) alternative is that the way I use MTIME is wrong.
>From my understanding, coding discontinuous change-events with conditional IF
>statements in a $DES block may not be a very good idea. That's the reason I
>inquired about MTIME as an alternative.
I paste below a larger chunck of my control file so you may see what I mean.
$SUBROUTINE ADVAN6 TOL=6
$MODEL NCOMP=1 COMP=(CENTRAL)
$PK
CV=THETA(1)*EXP(ETA(1))
CV2=CV**2
MDT=THETA(2)*EXP(ETA(2))
K=THETA(3)*EXP(ETA(3))
V=THETA(4)*EXP(ETA(4))
MTIME(1)=THETA(5)+ETA(5)
DOSE=1000000
$DES
P1=2*3.141593*CV2*(T+0.00001)**3
P2=((T+0.00001)-MDT)**2
P3=2*CV2*MDT*(T+0.00001)
P4=SQRT(MDT/P1)
RATIO=-1*(P2/P3)
P5=EXP(RATIO)
IG=P4*P5
INPUT=IG*MPAST(1)
DADT(1)=(DOSE/V)*INPUT-K*A(1)
Thanks again :o)
Pierre-Olivier
-----Message d'origine-----
De : Luann Phillips [mailto:[email protected]]
Envoyé : 27 juillet 2011 22:01
À : Tremblay, Pierre-Olivier
Cc : [email protected]
Objet : Re: [NMusers] lagged absorption and empirical input function
Pierre-Olivier,
NONMEM takes care of all inputs via the structure of dosing records in the
input dataset. Therefore, they are not included in the $DES block.
Instead:
In the input dataset
ID TIME AMT DV etc.
1 0 100 .
1 1 . 5
etc.
$PK
ALAG1=THETA(#) ;this will be the estimate of the absorption lag
S1=1/V
etc.
$DES
;note NONMEM codes diff. eqs. in amount units. The scale parameter (S1) ;in $PK
is used to convert the amount (AMT) unit to the DV (or conc.) ;unit ;NONMEM
will insert the dose of 100 at the TIME of the dose in the ;dataset + ALAG1.
The input will remain zero until that time automatically.
DADT(1)=-K*A(1)
----------------
If you are fitting a basic 1 cmt model with first-order elimination, I would
recommend using subroutine ADVAN1 TRANS1. You don't provide $DES for this
model. You just supply $PK.
$PK
K=THETA(1)
V=THETA(2)
ALAG1=THETA(3)
S1=1/V ;or whatever is appropriate for your units of dose,v,and dv.
-------------
Best Regards,
Luann Phillips
Director, PK/PD
Cognigen Corporation
Tremblay, Pierre-Olivier wrote:
> Hi,
>
> I'm trying to implement an absorption lag-time into a model described
> by differential equations and using an empirical input function.
>
> My initial idea was to define a MTIME(1) corresponding to the lag-time
> and to use MPAST(1) to set the start of the input as below.
>
> DADT(1)=(DOSE/V)*INPUT*MPAST(1)-K*A(1)
>
> However, I only end up with no input at all in the system resulting in
> simulated DV of 0 ± residual error. The issue seems related to the
> use MPAST with the input function but I don't know how.
>
> Would anyone be kind enough to point me in the right direction?
>
> Thanks,
>
> Pierre-Olivier
>
Dear Xiao,
This is not correct. When you specify ALAG1, the delay will be applied to doses specified on the dosing records of the data file (i.e where AMT > 0), but not in the case of Pierre-Olivier's problem where input is explicitly defined in the control stream.
Regards,
Katya
Ekaterina Gibiansky, Ph.D.
CEO&CSO, QuantPharm LLC
Web: www.quantpharm.com
Email: EGibiansky at quantpharm.com
Quoted reply history
On 7/28/2011 11:39 AM, Xiao Hu wrote:
> Dear Pierre-Olivier,
> I think once you defined ALAG(1)=THETA() (as Luann suggested), the system will
> delay your input. You don't have to specify anything in the $DES block. It's
> worth trying.
>
> $PK
> ALAG(1)=THETA()
>
> $DES
> DADT(1)=(DOSE/V)*INPUT-K*A(1)
>
> Best regards,
> Xiao (Shelley)
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On
> Behalf Of Tremblay, Pierre-Olivier
> Sent: Wednesday, July 27, 2011 11:10 PM
> To: Luann Phillips
> Cc: [email protected]
> Subject: RE: [NMusers] lagged absorption and empirical input function
>
> Thank you Luann and Jan-Stefan for your suggestions. If I understand correctly you are
> suggesting I use ADVAN1 or another "pre-coded" ADVAN routine which precludes
> the use of the $DES block. In fact, I actually have a reasonnable fit to my data from a
> zero-order input (pretty sharp peaks) and with duration (D1) set as a fixed-effect, using
> either ADVAN1 or ADVAN5. Obviously, with these ADVANs, lag-times are a matter of
> declaring ALAGs (or sometimes using transit compartments to fit the model to slowly
> increasing early concentrations as Jan-Stefan suggested).
>
> However, I deliberately choose to have an empirical p.d.f. (weibull, inverse
> gaussian or other) as an input because that will be used in a later IVIVC
> modeling and the cumulative density distribution of these functions can be
> readily fitted to dissolution data. The thing is this, one of the formulations
> I have to work with is enteric-coated, hence the need to model a lag-time.
>
> My problem is that MTIME works perfectly fine with rate constants in differential
> equations but apparently not so much with "block" functions, so to speak. An
> (more probable) alternative is that the way I use MTIME is wrong.
>
> > From my understanding, coding discontinuous change-events with conditional IF
> statements in a $DES block may not be a very good idea. That's the reason I
> inquired about MTIME as an alternative.
>
> I paste below a larger chunck of my control file so you may see what I mean.
>
> $SUBROUTINE ADVAN6 TOL=6
> $MODEL NCOMP=1 COMP=(CENTRAL)
> $PK
> CV=THETA(1)*EXP(ETA(1))
> CV2=CV**2
> MDT=THETA(2)*EXP(ETA(2))
> K=THETA(3)*EXP(ETA(3))
> V=THETA(4)*EXP(ETA(4))
> MTIME(1)=THETA(5)+ETA(5)
> DOSE=1000000
> $DES
> P1=2*3.141593*CV2*(T+0.00001)**3
> P2=((T+0.00001)-MDT)**2
> P3=2*CV2*MDT*(T+0.00001)
> P4=SQRT(MDT/P1)
> RATIO=-1*(P2/P3)
> P5=EXP(RATIO)
> IG=P4*P5
> INPUT=IG*MPAST(1)
> DADT(1)=(DOSE/V)*INPUT-K*A(1)
>
> Thanks again :o)
>
> Pierre-Olivier
>
> -----Message d'origine-----
> De : Luann Phillips [mailto:[email protected]]
> Envoyé : 27 juillet 2011 22:01
> À : Tremblay, Pierre-Olivier
> Cc : [email protected]
> Objet : Re: [NMusers] lagged absorption and empirical input function
>
> Pierre-Olivier,
>
> NONMEM takes care of all inputs via the structure of dosing records in the
> input dataset. Therefore, they are not included in the $DES block.
>
> Instead:
>
> In the input dataset
>
> ID TIME AMT DV etc.
> 1 0 100 .
> 1 1 . 5
> etc.
>
> $PK
> ALAG1=THETA(#) ;this will be the estimate of the absorption lag
> S1=1/V
> etc.
>
> $DES
> ;note NONMEM codes diff. eqs. in amount units. The scale parameter (S1) ;in $PK
> is used to convert the amount (AMT) unit to the DV (or conc.) ;unit ;NONMEM
> will insert the dose of 100 at the TIME of the dose in the ;dataset + ALAG1.
> The input will remain zero until that time automatically.
>
> DADT(1)=-K*A(1)
>
> ----------------
>
> If you are fitting a basic 1 cmt model with first-order elimination, I would
> recommend using subroutine ADVAN1 TRANS1. You don't provide $DES for this
> model. You just supply $PK.
>
> $PK
> K=THETA(1)
> V=THETA(2)
> ALAG1=THETA(3)
> S1=1/V ;or whatever is appropriate for your units of dose,v,and dv.
>
> -------------
>
> Best Regards,
>
> Luann Phillips
> Director, PK/PD
> Cognigen Corporation
>
> Tremblay, Pierre-Olivier wrote:
>
> > Hi,
> >
> > I'm trying to implement an absorption lag-time into a model described
> > by differential equations and using an empirical input function.
> >
> > My initial idea was to define a MTIME(1) corresponding to the lag-time
> > and to use MPAST(1) to set the start of the input as below.
> >
> > DADT(1)=(DOSE/V)*INPUT*MPAST(1)-K*A(1)
> >
> > However, I only end up with no input at all in the system resulting in
> > simulated DV of 0 ± residual error. The issue seems related to the
> > use MPAST with the input function but I don't know how.
> >
> > Would anyone be kind enough to point me in the right direction?
> >
> > Thanks,
> >
> > Pierre-Olivier
Dear all,
This issue is worth a bit more discussion.
My understanding about ALAG is, for example if a dose is given at 5 hours,
the time of this dose input into the system would be 5+ALAG. This time delay
is correctly executed only when the dose input is implemented through any of
the ADVAN routines. If the dose input function is user-defined as in this
case, the INPUT is a function of T and I don't think NONMEM will add ALAG to
a user-defined T function.
So Leonid's solution is correct. Correct me if I am wrong.
Jun Shen
Senior Pharmacokineticist
Seventh Wave Labs
Quoted reply history
On Thu, Jul 28, 2011 at 10:39 AM, Xiao Hu <[email protected]> wrote:
> Dear Pierre-Olivier,
> I think once you defined ALAG(1)=THETA() (as Luann suggested), the system
> will delay your input. You don't have to specify anything in the $DES
> block. It's worth trying.
>
> $PK
> ALAG(1)=THETA()
>
> $DES
> DADT(1)=(DOSE/V)*INPUT-K*A(1)
>
> Best regards,
> Xiao (Shelley)
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of Tremblay, Pierre-Olivier
> Sent: Wednesday, July 27, 2011 11:10 PM
> To: Luann Phillips
> Cc: [email protected]
> Subject: RE: [NMusers] lagged absorption and empirical input function
>
> Thank you Luann and Jan-Stefan for your suggestions. If I understand
> correctly you are suggesting I use ADVAN1 or another "pre-coded" ADVAN
> routine which precludes the use of the $DES block. In fact, I actually have
> a reasonnable fit to my data from a zero-order input (pretty sharp peaks)
> and with duration (D1) set as a fixed-effect, using either ADVAN1 or ADVAN5.
> Obviously, with these ADVANs, lag-times are a matter of declaring ALAGs (or
> sometimes using transit compartments to fit the model to slowly increasing
> early concentrations as Jan-Stefan suggested).
>
> However, I deliberately choose to have an empirical p.d.f. (weibull,
> inverse gaussian or other) as an input because that will be used in a later
> IVIVC modeling and the cumulative density distribution of these functions
> can be readily fitted to dissolution data. The thing is this, one of the
> formulations I have to work with is enteric-coated, hence the need to model
> a lag-time.
>
> My problem is that MTIME works perfectly fine with rate constants in
> differential equations but apparently not so much with "block" functions, so
> to speak. An (more probable) alternative is that the way I use MTIME is
> wrong.
>
> From my understanding, coding discontinuous change-events with conditional
> IF statements in a $DES block may not be a very good idea. That's the
> reason I inquired about MTIME as an alternative.
>
> I paste below a larger chunck of my control file so you may see what I
> mean.
>
> $SUBROUTINE ADVAN6 TOL=6
> $MODEL NCOMP=1 COMP=(CENTRAL)
> $PK
> CV=THETA(1)*EXP(ETA(1))
> CV2=CV**2
> MDT=THETA(2)*EXP(ETA(2))
> K=THETA(3)*EXP(ETA(3))
> V=THETA(4)*EXP(ETA(4))
> MTIME(1)=THETA(5)+ETA(5)
> DOSE=1000000
> $DES
> P1=2*3.141593*CV2*(T+0.00001)**3
> P2=((T+0.00001)-MDT)**2
> P3=2*CV2*MDT*(T+0.00001)
> P4=SQRT(MDT/P1)
> RATIO=-1*(P2/P3)
> P5=EXP(RATIO)
> IG=P4*P5
> INPUT=IG*MPAST(1)
> DADT(1)=(DOSE/V)*INPUT-K*A(1)
>
> Thanks again :o)
>
> Pierre-Olivier
>
> -----Message d'origine-----
> De : Luann Phillips [mailto:[email protected]]
> Envoyé : 27 juillet 2011 22:01
> À : Tremblay, Pierre-Olivier
> Cc : [email protected]
> Objet : Re: [NMusers] lagged absorption and empirical input function
>
> Pierre-Olivier,
>
> NONMEM takes care of all inputs via the structure of dosing records in the
> input dataset. Therefore, they are not included in the $DES block.
>
> Instead:
>
> In the input dataset
>
> ID TIME AMT DV etc.
> 1 0 100 .
> 1 1 . 5
> etc.
>
>
> $PK
> ALAG1=THETA(#) ;this will be the estimate of the absorption lag
> S1=1/V
> etc.
>
> $DES
> ;note NONMEM codes diff. eqs. in amount units. The scale parameter (S1) ;in
> $PK is used to convert the amount (AMT) unit to the DV (or conc.) ;unit
> ;NONMEM will insert the dose of 100 at the TIME of the dose in the ;dataset
> + ALAG1. The input will remain zero until that time automatically.
>
> DADT(1)=-K*A(1)
>
> ----------------
>
> If you are fitting a basic 1 cmt model with first-order elimination, I
> would recommend using subroutine ADVAN1 TRANS1. You don't provide $DES for
> this model. You just supply $PK.
>
> $PK
> K=THETA(1)
> V=THETA(2)
> ALAG1=THETA(3)
> S1=1/V ;or whatever is appropriate for your units of dose,v,and dv.
>
>
> -------------
>
> Best Regards,
>
> Luann Phillips
> Director, PK/PD
> Cognigen Corporation
>
>
> Tremblay, Pierre-Olivier wrote:
> > Hi,
> >
> > I'm trying to implement an absorption lag-time into a model described
> > by differential equations and using an empirical input function.
> >
> > My initial idea was to define a MTIME(1) corresponding to the lag-time
> > and to use MPAST(1) to set the start of the input as below.
> >
> > DADT(1)=(DOSE/V)*INPUT*MPAST(1)-K*A(1)
> >
> > However, I only end up with no input at all in the system resulting in
> > simulated DV of 0 ± residual error. The issue seems related to the
> > use MPAST with the input function but I don't know how.
> >
> > Would anyone be kind enough to point me in the right direction?
> >
> > Thanks,
> >
> > Pierre-Olivier
> >
>
>
Pierre-Oliver,
I pasted your code into a control stream using THEOPP as data, used all
1's as initial estimates of thetas,
with no Estimation Step, and got reasonable looking non-zero
predictions.
Maybe there is some mistake in your initial estimates for Thetas, or, if
you are running the Estimation
Step, maybe NONMEM is driving the thetas to inappropriate values.
Attached is mpast.ctl and mpast.out
On Wed, 27 Jul 2011 23:10 -0400, "Tremblay, Pierre-Olivier"
<potremblay
> Thank you Luann and Jan-Stefan for your suggestions. If I understand
> correctly you are suggesting I use ADVAN1 or another "pre-coded" ADVAN
> routine which precludes the use of the $DES block. In fact, I actually
> have a reasonnable fit to my data from a zero-order input (pretty sharp
> peaks) and with duration (D1) set as a fixed-effect, using either ADVAN1
> or ADVAN5. Obviously, with these ADVANs, lag-times are a matter of
> declaring ALAGs (or sometimes using transit compartments to fit the model
> to slowly increasing early concentrations as Jan-Stefan suggested).
>
> However, I deliberately choose to have an empirical p.d.f. (weibull,
> inverse gaussian or other) as an input because that will be used in a
> later IVIVC modeling and the cumulative density distribution of these
> functions can be readily fitted to dissolution data. The thing is this,
> one of the formulations I have to work with is enteric-coated, hence the
> need to model a lag-time.
>
> My problem is that MTIME works perfectly fine with rate constants in
> differential equations but apparently not so much with "block" functions,
> so to speak. An (more probable) alternative is that the way I use MTIME
> is wrong.
>
> From my understanding, coding discontinuous change-events with
> conditional IF statements in a $DES block may not be a very good idea.
> That's the reason I inquired about MTIME as an alternative.
>
> I paste below a larger chunck of my control file so you may see what I
> mean.
>
> $SUBROUTINE ADVAN6 TOL=6
> $MODEL NCOMP=1 COMP=(CENTRAL)
> $PK
> CV=THETA(1)*EXP(ETA(1))
> CV2=CV**2
> MDT=THETA(2)*EXP(ETA(2))
> K=THETA(3)*EXP(ETA(3))
> V=THETA(4)*EXP(ETA(4))
> MTIME(1)=THETA(5)+ETA(5)
> DOSE00000
> $DES
> P1=2*3.141593*CV2*(T+0.00001)**3
> P2=((T+0.00001)-MDT)**2
> P3=2*CV2*MDT*(T+0.00001)
> P4=SQRT(MDT/P1)
> RATIO=-1*(P2/P3)
> P5=EXP(RATIO)
> IG=P4*P5
> INPUT=IG*MPAST(1)
> DADT(1)=(DOSE/V)*INPUT-K*A(1)
>
> Thanks again :o)
>
> Pierre-Olivier
>
> -----Message d'origine-----
Quoted reply history
> De : Luann Phillips [mailto:Luann.Phillips
> Envoyé : 27 juillet 2011 22:01
> À : Tremblay, Pierre-Olivier
> Cc : nmusers
> Objet : Re: [NMusers] lagged absorption and empirical input function
>
> Pierre-Olivier,
>
> NONMEM takes care of all inputs via the structure of dosing records in
> the input dataset. Therefore, they are not included in the $DES block.
>
> Instead:
>
> In the input dataset
>
> ID TIME AMT DV etc.
> 1 0 100 .
> 1 1 . 5
> etc.
>
>
> $PK
> ALAG1=THETA(#) ;this will be the estimate of the absorption lag
> S1=1/V
> etc.
>
> $DES
> ;note NONMEM codes diff. eqs. in amount units. The scale parameter (S1)
> ;in $PK is used to convert the amount (AMT) unit to the DV (or conc.)
> ;unit ;NONMEM will insert the dose of 100 at the TIME of the dose in the
> ;dataset + ALAG1. The input will remain zero until that time
> automatically.
>
> DADT(1)=-K*A(1)
>
> ----------------
>
> If you are fitting a basic 1 cmt model with first-order elimination, I
> would recommend using subroutine ADVAN1 TRANS1. You don't provide $DES
> for this model. You just supply $PK.
>
> $PK
> K=THETA(1)
> V=THETA(2)
> ALAG1=THETA(3)
> S1=1/V ;or whatever is appropriate for your units of dose,v,and dv.
>
>
> -------------
>
> Best Regards,
>
> Luann Phillips
> Director, PK/PD
> Cognigen Corporation
>
>
> Tremblay, Pierre-Olivier wrote:
> > Hi,
> >
> > I'm trying to implement an absorption lag-time into a model described
> > by differential equations and using an empirical input function.
> >
> > My initial idea was to define a MTIME(1) corresponding to the lag-time
> > and to use MPAST(1) to set the start of the input as below.
> >
> > DADT(1)=(DOSE/V)*INPUT*MPAST(1)-K*A(1)
> >
> > However, I only end up with no input at all in the system resulting in
> > simulated DV of 0 ± residual error. The issue seems related to th
e
> > use MPAST with the input function but I don't know how.
> >
> > Would anyone be kind enough to point me in the right direction?
> >
> > Thanks,
> >
> > Pierre-Olivier
> >
>
--
Alison Boeckmann
alisonboeckmann
application/octet-stream attachment: mpast.ctl
application/octet-stream attachment: mpast.out
Pierre-Oliver,
I pasted your code into a control stream using THEOPP as data, used all
1's as initial estimates of thetas,
with no Estimation Step, and got reasonable looking non-zero
predictions.
Maybe there is some mistake in your initial estimates for Thetas, or, if
you are running the Estimation
Step, maybe NONMEM is driving the thetas to inappropriate values.
Attached is mpast.ctl and mpast.out
Quoted reply history
On Wed, 27 Jul 2011 23:10 -0400, "Tremblay, Pierre-Olivier"
<[email protected]> wrote:
> Thank you Luann and Jan-Stefan for your suggestions. If I understand
> correctly you are suggesting I use ADVAN1 or another "pre-coded" ADVAN
> routine which precludes the use of the $DES block. In fact, I actually
> have a reasonnable fit to my data from a zero-order input (pretty sharp
> peaks) and with duration (D1) set as a fixed-effect, using either ADVAN1
> or ADVAN5. Obviously, with these ADVANs, lag-times are a matter of
> declaring ALAGs (or sometimes using transit compartments to fit the model
> to slowly increasing early concentrations as Jan-Stefan suggested).
>
> However, I deliberately choose to have an empirical p.d.f. (weibull,
> inverse gaussian or other) as an input because that will be used in a
> later IVIVC modeling and the cumulative density distribution of these
> functions can be readily fitted to dissolution data. The thing is this,
> one of the formulations I have to work with is enteric-coated, hence the
> need to model a lag-time.
>
> My problem is that MTIME works perfectly fine with rate constants in
> differential equations but apparently not so much with "block" functions,
> so to speak. An (more probable) alternative is that the way I use MTIME
> is wrong.
>
> From my understanding, coding discontinuous change-events with
> conditional IF statements in a $DES block may not be a very good idea.
> That's the reason I inquired about MTIME as an alternative.
>
> I paste below a larger chunck of my control file so you may see what I
> mean.
>
> $SUBROUTINE ADVAN6 TOL=6
> $MODEL NCOMP=1 COMP=(CENTRAL)
> $PK
> CV=THETA(1)*EXP(ETA(1))
> CV2=CV**2
> MDT=THETA(2)*EXP(ETA(2))
> K=THETA(3)*EXP(ETA(3))
> V=THETA(4)*EXP(ETA(4))
> MTIME(1)=THETA(5)+ETA(5)
> DOSE=1000000
> $DES
> P1=2*3.141593*CV2*(T+0.00001)**3
> P2=((T+0.00001)-MDT)**2
> P3=2*CV2*MDT*(T+0.00001)
> P4=SQRT(MDT/P1)
> RATIO=-1*(P2/P3)
> P5=EXP(RATIO)
> IG=P4*P5
> INPUT=IG*MPAST(1)
> DADT(1)=(DOSE/V)*INPUT-K*A(1)
>
> Thanks again :o)
>
> Pierre-Olivier
>
> -----Message d'origine-----
> De : Luann Phillips [mailto:[email protected]]
> Envoyé : 27 juillet 2011 22:01
> À : Tremblay, Pierre-Olivier
> Cc : [email protected]
> Objet : Re: [NMusers] lagged absorption and empirical input function
>
> Pierre-Olivier,
>
> NONMEM takes care of all inputs via the structure of dosing records in
> the input dataset. Therefore, they are not included in the $DES block.
>
> Instead:
>
> In the input dataset
>
> ID TIME AMT DV etc.
> 1 0 100 .
> 1 1 . 5
> etc.
>
>
> $PK
> ALAG1=THETA(#) ;this will be the estimate of the absorption lag
> S1=1/V
> etc.
>
> $DES
> ;note NONMEM codes diff. eqs. in amount units. The scale parameter (S1)
> ;in $PK is used to convert the amount (AMT) unit to the DV (or conc.)
> ;unit ;NONMEM will insert the dose of 100 at the TIME of the dose in the
> ;dataset + ALAG1. The input will remain zero until that time
> automatically.
>
> DADT(1)=-K*A(1)
>
> ----------------
>
> If you are fitting a basic 1 cmt model with first-order elimination, I
> would recommend using subroutine ADVAN1 TRANS1. You don't provide $DES
> for this model. You just supply $PK.
>
> $PK
> K=THETA(1)
> V=THETA(2)
> ALAG1=THETA(3)
> S1=1/V ;or whatever is appropriate for your units of dose,v,and dv.
>
>
> -------------
>
> Best Regards,
>
> Luann Phillips
> Director, PK/PD
> Cognigen Corporation
>
>
> Tremblay, Pierre-Olivier wrote:
> > Hi,
> >
> > I'm trying to implement an absorption lag-time into a model described
> > by differential equations and using an empirical input function.
> >
> > My initial idea was to define a MTIME(1) corresponding to the lag-time
> > and to use MPAST(1) to set the start of the input as below.
> >
> > DADT(1)=(DOSE/V)*INPUT*MPAST(1)-K*A(1)
> >
> > However, I only end up with no input at all in the system resulting in
> > simulated DV of 0 ± residual error. The issue seems related to the
> > use MPAST with the input function but I don't know how.
> >
> > Would anyone be kind enough to point me in the right direction?
> >
> > Thanks,
> >
> > Pierre-Olivier
> >
>
--
Alison Boeckmann
[email protected]
mpast.ctl
Description:
Binary data
mpast.out
Description:
Binary data