Dear NMusers
I have an issue with coding my $PK block (in ADVAN6 (8)) for a particular
situation.
How could I code a punctual removal of a certain amount from a depot
compartment between scheduled multiple doses without having recourse to an
additional and punctual clearance?
In other words, I would like to subtract a certain amount (i.e. negative
bolus, this amount would in fact appear as an individual parameter in the
dataset) without working with rates and clearances? Is it possible?
Let me know if you need additional information.
Many thanks in advance.
Best regards.
Robert
___________________________________________
Robert M. Kalicki, MD
Postdoctoral Fellow
Department of Nephrology and Hypertension
Inselspital
University of Bern
Switzerland
Address:
Klinik und Poliklinik für Nephrologie und Hypertonie
KiKl G6
Freiburgstrasse 15
CH-3010 Inselspital Bern
Tel +41(0)31 632 96 63
Fax +41(0)31 632 14 58
$PK ADVAN6
5 messages
4 people
Latest: Sep 02, 2010
Robert,
I believe this is similar to entero-hepatic recycling coding,
You could code it as follows
IF (TIME.EQ.X) THEN
DADT(1) = -BOLUS +...
ENDIF
IF (TIME.NE.X) THEN
DADT(1) = ...
ENDIF
This could also be In the $PK or $PRED blocks.
Matt.
Quoted reply history
From: [email protected] [mailto:[email protected]] On
Behalf Of Robert Kalicki
Sent: Wednesday, September 01, 2010 8:47 AM
To: [email protected]
Subject: [NMusers] $PK ADVAN6
Dear NMusers
I have an issue with coding my $PK block (in ADVAN6 (8)) for a particular
situation.
How could I code a punctual removal of a certain amount from a depot
compartment between scheduled multiple doses without having recourse to an
additional and punctual clearance?
In other words, I would like to subtract a certain amount (i.e. "negative
bolus", this amount would in fact appear as an individual parameter in the
dataset) without working with rates and clearances? Is it possible?
Let me know if you need additional information.
Many thanks in advance.
Best regards.
Robert
___________________________________________
Robert M. Kalicki, MD
Postdoctoral Fellow
Department of Nephrology and Hypertension
Inselspital
University of Bern
Switzerland
Address:
Klinik und Poliklinik für Nephrologie und Hypertonie
KiKl G6
Freiburgstrasse 15
CH-3010 Inselspital Bern
Tel +41(0)31 632 96 63
Fax +41(0)31 632 14 58
________________________________
This e-mail (including any attachments) is confidential and may be legally
privileged. If you are not an intended recipient or an authorized
representative of an intended recipient, you are prohibited from using, copying
or distributing the information in this e-mail or its attachments. If you have
received this e-mail in error, please notify the sender immediately by return
e-mail and delete all copies of this message and any attachments.
Thank you.
Robert
I do not think you can do it directly. I've done something like this by introducing a parallel system (exactly the same as your model), adding a positive amount (that correspond to your subtraction) and then combining two solutions to get the prediction. However, you need linearity (of absorption in this case) to use superposition.
Sample code:
DADT(1)= -KA*A(1); depot; put all real doses here
DADT(4)= -KA*A(4) ; depot for negative doses; put all doses that need to be subtracted here
DADT(2)= KA*(A(1)-A(4)) + ...; Central
You need to check that you subtract less than you have in the depot. If this is a concern, it is more difficult to implement. I would try something like
F4=1
IF(NDOSE.GT.A(1)) F4=A(1)/NDOSE ; here NDOSE is the dose do subtract
You need to be careful since A(1) in the PK block is the previous-event amount. You may need two records for each subtracted dose: one with EVID=2 to get A-value, and another with EVID=1 to get dose to compartment 4
Leonid
--------------------------------------
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 9/1/2010 9:46 AM, Robert Kalicki wrote:
> Dear NMusers
>
> I have an issue with coding my $PK block (in ADVAN6 (8)) for a
> particular situation.
>
> How could I code a punctual removal of a certain amount from a depot
> compartment between scheduled multiple doses without having recourse to
> an additional and punctual clearance?
>
> In other words, I would like to subtract a certain amount (i.e.
> “negative bolus”, this amount would in fact appear as an individual
> parameter in the dataset) without working with rates and clearances? Is
> it possible?
>
> Let me know if you need additional information.
>
> Many thanks in advance.
>
> Best regards.
>
> Robert
>
> ___________________________________________
> Robert M. Kalicki, MD
>
> Postdoctoral Fellow
>
> Department of Nephrology and Hypertension
>
> Inselspital
>
> University of Bern
>
> Switzerland
>
> Address:
>
> Klinik und Poliklinik für Nephrologie und Hypertonie
>
> KiKl G6
>
> Freiburgstrasse 15
>
> CH-3010 Inselspital Bern
>
> Tel +41(0)31 632 96 63
>
> Fax +41(0)31 632 14 58
Robert, This is ugly, someone else likely has a better solution, but it seems to work: control $PROBLEM Neg BOLUS $INPUT ID TIME AMT DV EVID CMT IND DROP $DATA DATA.PRN $SUB ADVAN6 TOL = 6 $MODEL COMP = (ONLY,DEFDOSE, DEFOBS) $THETA (0.06,FIXED) ;CL $OMEGA 0.5 $SIGMA 0.1 $PK " FIRST " COMMON /MYCOM/MYA " IF(IND.EQ.1) THEN " MYA = A(1) " END IF AT = MYA K = THETA(1)*EXP(ETA(1)) IF( IND.EQ.2.AND.AT.GT .20) THEN F1 = AT-20 ; assume 20 unit decrement in amount in compartment. ELSE F1 = 1 END IF $ERROR Y = F +ERR(1) AONE = A(1) $DES DADT(1) = -K*A(1) $SIM (1234) $TABLE ID TIME AMT DV MDV F1 AONE AT EVID IND NOPRINT FILE=OUT.DAT data file # ID TIME AMT DV EVID CMT IND CALL 1 0 80 . 1 1 0 0 1 0 . . 2 1 0 0 1 1 . . 2 1 0 0 1 2 . . 2 1 0 0 1 3 . . 2 1 0 0 1 4 . . 2 1 0 0 1 6 . . 2 1 0 0 1 6.4 . . 2 1 0 0 1 6.5 . . 2 1 0 0 1 6.6 . . 2 1 0 0 1 6.7 . . 2 1 0 0 1 6.8 . . 2 1 0 0 1 6.9 . . 2 1 0 0 1 7 . . 2 -1 1 2 1 7 1 . 1 1 2 2 1 7.1 . . 2 1 0 0 1 7.2 . . 2 1 0 0 1 7.3 . . 2 1 0 0 1 7.5 . . 2 1 0 0 1 8 . . 2 1 0 0 1 12 . . 2 1 0 0 1 24 . . 2 1 0 0 1 36 . . 2 1 0 0 1 48 . . 2 1 0 0 1 60 . . 2 1 0 0 turns out, you don't need the call data item. But, basically this remembers the amount in compartment 1 by putting it into a common (this won't work in NONMEM 7, BTW). Record (at time = 7) resets that compartment (CMT = -1). On the next record it uses that saved value (MYA or AT) to set F1 (to, in this case 20 units less than it was before) for the dose (also at time = 7). The negative bolus (20 in this case) could easily enough be read in from the data set. Hope this helps. Mark Mark Sale MD Next Level Solutions, LLC www.NextLevelSolns.com 919-846-9185 A carbon-neutral company See our real time solar energy production at: http://enlighten.enphaseenergy.com/public/systems/aSDz2458
>> *From:* [email protected]
>> [ mailto: [email protected] ] *On Behalf Of *Robert Kalicki
>> *Sent:* Wednesday, September 01, 2010 8:47 AM
>> *To:* [email protected]
>> *Subject:* [NMusers] $PK ADVAN6
>>
>> Dear NMusers
>>
>> I have an issue with coding my $PK block (in ADVAN6 (8)) for a
>> particular situation.
>>
>> How could I code a punctual removal of a certain amount from a depot
>> compartment between scheduled multiple doses without having recourse to
>> an additional and punctual clearance?
>>
>> In other words, I would like to subtract a certain amount (i.e.
>> "negative bolus", this amount would in fact appear as an individual
>> parameter in the dataset) without working with rates and clearances? Is
>> it possible?
>>
>> Let me know if you need additional information.
>>
>> Many thanks in advance.
>>
>> Best regards.
>>
>> Robert
>>
>> ___________________________________________
>> Robert M. Kalicki, MD
>>
>> Postdoctoral Fellow
>>
>> Department of Nephrology and Hypertension
>>
>> Inselspital
>>
>> University of Bern
>>
>> Switzerland
>>
>> Address:
>>
>> Klinik und Poliklinik für Nephrologie und Hypertonie
>>
>> KiKl G6
>>
>> Freiburgstrasse 15
>>
>> CH-3010 Inselspital Bern
>>
>> Tel +41(0)31 632 96 63
>>
>> Fax +41(0)31 632 14 58
>>
>>
>> ------------------------------------------------------------------------
>> This e-mail (including any attachments) is confidential and may be
>> legally privileged. If you are not an intended recipient or an
>> authorized representative of an intended recipient, you are prohibited
>> from using, copying or distributing the information in this e-mail or
>> its attachments. If you have received this e-mail in error, please
>> notify the sender immediately by return e-mail and delete all copies of
>> this message and any attachments.
>>
>> Thank you.
>
>
> This e-mail (including any attachments) is confidential and may be legally privileged. If you are not an intended recipient or an authorized representative of an intended recipient, you are prohibited from using, copying or distributing the information in this e-mail or its attachments. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete all copies of this message and any attachments.
>
> Thank you.
>
Hi Leonid, Mark and Matt
Thank you very much for your ideas, advices and help.
It only remains for me to try your solutions on a reduced dataset and to see if
it works.
I will give you a feed-back ASAP.
Many thanks
Best regards
Robert
-----Message d'origine-----
Quoted reply history
De : Leonid Gibiansky [mailto:[email protected]]
Envoyé : jeudi 2 septembre 2010 00:02
À : Mark Sale - Next Level Solutions
Cc : Robert Kalicki; [email protected]
Objet : Re: [NMusers] $PK ADVAN6
Mark,
Minor correction: you should include extra data record with time = 7:
....
1 6.9 . . 2 1 0 0
1 7 . . 2 1 0 0
1 7 . . 2 -1 1 2
1 7 1 . 1 1 2 2
1 7.1 . . 2 1 0 0
...
Otherwise, MYA is equal to the A(1) at time=6.9 (previous event record)
Leonid
--------------------------------------
Leonid Gibiansky, Ph.D.
President, QuantPharm LLC
web: www.quantpharm.com
e-mail: LGibiansky at quantpharm.com
tel: (301) 767 5566
On 9/1/2010 5:02 PM, Mark Sale - Next Level Solutions wrote:
>
> Robert,
> This is ugly, someone else likely has a better solution, but it seems to
> work:
> control
> $PROBLEM Neg BOLUS
> $INPUT ID TIME AMT DV EVID CMT IND DROP
> $DATA DATA.PRN
> $SUB ADVAN6 TOL = 6
> $MODEL
> COMP = (ONLY,DEFDOSE, DEFOBS)
>
> $THETA
> (0.06,FIXED) ;CL
>
>
> $OMEGA
> 0.5
> $SIGMA 0.1
> $PK
> " FIRST
> " COMMON /MYCOM/MYA
> " IF(IND.EQ.1) THEN
> " MYA = A(1)
> " END IF
> AT = MYA
> K = THETA(1)*EXP(ETA(1))
> IF(IND.EQ.2.AND.AT.GT http://IND.EQ.2.AND.AT.GT.20) THEN
> F1 = AT-20 ; assume 20 unit decrement in amount in compartment.
> ELSE
> F1 = 1
> END IF
>
> $ERROR
> Y = F +ERR(1)
> AONE = A(1)
> $DES
>
> DADT(1) = -K*A(1)
> $SIM (1234)
> $TABLE ID TIME AMT DV MDV F1 AONE AT EVID IND NOPRINT FILE=OUT.DAT
>
>
> data file
> # ID TIME AMT DV EVID CMT IND CALL
> 1 0 80 . 1 1 0 0
> 1 0 . . 2 1 0 0
> 1 1 . . 2 1 0 0
> 1 2 . . 2 1 0 0
> 1 3 . . 2 1 0 0
> 1 4 . . 2 1 0 0
> 1 6 . . 2 1 0 0
> 1 6.4 . . 2 1 0 0
> 1 6.5 . . 2 1 0 0
> 1 6.6 . . 2 1 0 0
> 1 6.7 . . 2 1 0 0
> 1 6.8 . . 2 1 0 0
> 1 6.9 . . 2 1 0 0
> 1 7 . . 2 -1 1 2
> 1 7 1 . 1 1 2 2
> 1 7.1 . . 2 1 0 0
> 1 7.2 . . 2 1 0 0
> 1 7.3 . . 2 1 0 0
> 1 7.5 . . 2 1 0 0
> 1 8 . . 2 1 0 0
> 1 12 . . 2 1 0 0
> 1 24 . . 2 1 0 0
> 1 36 . . 2 1 0 0
> 1 48 . . 2 1 0 0
> 1 60 . . 2 1 0 0
>
> turns out, you don't need the call data item.
> But, basically this remembers the amount in compartment 1 by putting it
> into a common (this won't work in NONMEM 7, BTW). Record (at time = 7)
> resets that compartment (CMT = -1). On the next record it uses that
> saved value (MYA or AT) to set F1 (to, in this case 20 units less than
> it was before) for the dose (also at time = 7). The negative bolus (20
> in this case) could easily enough be read in from the data set.
>
> Hope this helps.
>
> Mark
>
>
>
>
> Mark Sale MD
> Next Level Solutions, LLC
> www.NextLevelSolns.com http://www.NextLevelSolns.com
> 919-846-9185
> A carbon-neutral company
> See our real time solar energy production at:
> http://enlighten.enphaseenergy.com/public/systems/aSDz2458
>
> > > *From:* [email protected]
> <mailto:[email protected]>
> > > [mailto:[email protected]] *On Behalf Of *Robert Kalicki
> > > *Sent:* Wednesday, September 01, 2010 8:47 AM
> > > *To:* [email protected] <mailto:[email protected]>
> > > *Subject:* [NMusers] $PK ADVAN6
> > >
> > > Dear NMusers
> > >
> > > I have an issue with coding my $PK block (in ADVAN6 (8)) for a
> > > particular situation.
> > >
> > > How could I code a punctual removal of a certain amount from a depot
> > > compartment between scheduled multiple doses without having
> recourse to
> > > an additional and punctual clearance?
> > >
> > > In other words, I would like to subtract a certain amount (i.e.
> > > "negative bolus", this amount would in fact appear as an individual
> > > parameter in the dataset) without working with rates and
> clearances? Is
> > > it possible?
> > >
> > > Let me know if you need additional information.
> > >
> > > Many thanks in advance.
> > >
> > > Best regards.
> > >
> > > Robert
> > >
> > > ___________________________________________
> > > Robert M. Kalicki, MD
> > >
> > > Postdoctoral Fellow
> > >
> > > Department of Nephrology and Hypertension
> > >
> > > Inselspital
> > >
> > > University of Bern
> > >
> > > Switzerland
> > >
> > > Address:
> > >
> > > Klinik und Poliklinik für Nephrologie und Hypertonie
> > >
> > > KiKl G6
> > >
> > > Freiburgstrasse 15
> > >
> > > CH-3010 Inselspital Bern
> > >
> > > Tel +41(0)31 632 96 63
> > >
> > > Fax +41(0)31 632 14 58
> > >
> > >
> > >
> ------------------------------------------------------------------------
> > > This e-mail (including any attachments) is confidential and may be
> > > legally privileged. If you are not an intended recipient or an
> > > authorized representative of an intended recipient, you are
> prohibited
> > > from using, copying or distributing the information in this e-mail or
> > > its attachments. If you have received this e-mail in error, please
> > > notify the sender immediately by return e-mail and delete all
> copies of
> > > this message and any attachments.
> > >
> > > Thank you.
> >
> >
> > This e-mail (including any attachments) is confidential and may be
> legally privileged. If you are not an intended recipient or an
> authorized representative of an intended recipient, you are
> prohibited from using, copying or distributing the information in
> this e-mail or its attachments. If you have received this e-mail in
> error, please notify the sender immediately by return e-mail and
> delete all copies of this message and any attachments.
> >
> > Thank you.
> >
>