Re: [NMusers] Code for EHC
Dear Sam and Ayyappa, The postings that Sam mentioned are obsolete. The first of the model time examples (help mtime) suggests a better technique for modelling EHC using MTIME parameters, as follows: Enterohepatic Recycling This fragment of abbreviated code may be used to model EHC. The transfer of drug from compt. 4 to 1 is controlled by FLAG, which is 1 between the times specified by MTIME(1) and MTIME(2), and is 0 otherwise. $PK MTIME(1)=THETA(8) MTIME(2)=MTIME(1)+THETA(9) $DES FLAG=MPAST(1)-MPAST(2) DADT(1)=-KA*A(1)+K41*A(4)*FLAG DADT(4)=K1G*A(2)-K41*A(4)*FLAG From Intro.to NONMEM VI guide: There is a new feature: model event times. These are additional PK parameters MTIME(i) defined in the PK routine or $PK block. A model event time, like an absorption lag time, defines a time to which the system is advanced, but whose value usually cannot be known in advance. When the time is reached, certain indicator variables are set and a call to PK is made. At this call PK, DES, AES and ERROR can use the indicator variables to change some aspect of the system, e.g., a term in a differential equation, or the rate of an infusion. Thus, a model event time can be used e.g. to mark the time at which the gall bladder begins to empty. A model event time could be implemented by using an absorption lag time, and this is what has been done until now, but doing this is somewhat clumsy. There may be up to PCT model event times, where PCT is a new installation parameter defined in SIZES. Its default value is 30. (See the MTIME and $PK and PRDPK1 and PRDPK2 Help Items and the MODEL TIME Example) On Thu, 04 Dec 2008 08:43:59 -0500, Sam Liao [EMAIL PROTECTED] said: Dear Ayyappa: I think you will find the following nmusers net post useful for your model. Alison had kindly provided some code for a EHC model. Best regards, Sam Liao Pharmax Research === *Enterohepatic Recirculation Model http://www.cognigencorp.com/nonmem/nm/98oct061998.html* *|... |*this compartment to the change-point. Based on these ideas, here's how I would modify Rik's code. The change also provides for the termination of *EHC http://www.cognigencorp.com/nonmem/nm/98oct061998.html#pgfId=424161*. If you want to let *EHC* continue indefinitely, delete compartment 6 and its dose, and the code involving ALAG6. 1) Add 2 more compartments to $MODEL:*| ...|* / http://www.cognigencorp.com/nonmem/nm/98oct061998.html/ 05/06/03, 19876 bytes Dear All, I am trying to model PK data of a drug and many subjects show double peaks but even in fasting state. Can we expect EHC in fasting state? Can anybody provide some coding help in modeling intermittent episodes of EHC rather than continuous mode? Thank you. Regards, Ayyappa Chaturvedula -- Alison Boeckmann [EMAIL PROTECTED]
Re: [NMusers] Code for EHC
Dear Alison: Thanks for let us know this new feature in nm 6. I have been working on EHC modeling for single dose as well as multiple dose pk data. I have some questions on how to use this new feature. How do we define the FLAG when we also have MTIME(3), MTIME(4), MTIME(5) and MTIME(6)? We observed one peak after each meals and there were three meals each day. Best regards, Sam Liao Pharmax Research Dear Sam and Ayyappa, The postings that Sam mentioned are obsolete. The first of the model time examples (help mtime) suggests a better technique for modelling EHC using MTIME parameters, as follows: Enterohepatic Recycling This fragment of abbreviated code may be used to model EHC. The transfer of drug from compt. 4 to 1 is controlled by FLAG, which is 1 between the times specified by MTIME(1) and MTIME(2), and is 0 otherwise. $PK MTIME(1)=THETA(8) MTIME(2)=MTIME(1)+THETA(9) $DES FLAG=MPAST(1)-MPAST(2) DADT(1)=-KA*A(1)+K41*A(4)*FLAG DADT(4)=K1G*A(2)-K41*A(4)*FLAG From Intro.to NONMEM VI guide: There is a new feature: model event times. These are additional PK parameters MTIME(i) defined in the PK routine or $PK block. A model event time, like an absorption lag time, defines a time to which the system is advanced, but whose value usually cannot be known in advance. When the time is reached, certain indicator variables are set and a call to PK is made. At this call PK, DES, AES and ERROR can use the indicator variables to change some aspect of the system, e.g., a term in a differential equation, or the rate of an infusion. Thus, a model event time can be used e.g. to mark the time at which the gall bladder begins to empty. A model event time could be implemented by using an absorption lag time, and this is what has been done until now, but doing this is somewhat clumsy. There may be up to PCT model event times, where PCT is a new installation parameter defined in SIZES. Its default value is 30. (See the MTIME and $PK and PRDPK1 and PRDPK2 Help Items and the MODEL TIME Example) On Thu, 04 Dec 2008 08:43:59 -0500, Sam Liao [EMAIL PROTECTED] said: Dear Ayyappa: I think you will find the following nmusers net post useful for your model. Alison had kindly provided some code for a EHC model. Best regards, Sam Liao Pharmax Research === *Enterohepatic Recirculation Model http://www.cognigencorp.com/nonmem/nm/98oct061998.html* *|... |*this compartment to the change-point. Based on these ideas, here's how I would modify Rik's code. The change also provides for the termination of *EHC http://www.cognigencorp.com/nonmem/nm/98oct061998.html#pgfId=424161*. If you want to let *EHC* continue indefinitely, delete compartment 6 and its dose, and the code involving ALAG6. 1) Add 2 more compartments to $MODEL:*| ...|* / http://www.cognigencorp.com/nonmem/nm/98oct061998.html/ 05/06/03, 19876 bytes Dear All, I am trying to model PK data of a drug and many subjects show double peaks but even in fasting state. Can we expect EHC in fasting state? Can anybody provide some coding help in modeling intermittent episodes of EHC rather than continuous mode? Thank you. Regards, Ayyappa Chaturvedula
Re: [NMusers] Code for EHC
Dear Sam and others, I prefer to be a lurker on this email list. I'd rather not be drawn into a lengthy discussion ...! To answer your question, it might look something like this: $PK (NON-EVENT) MTIME(1)=THETA(8) ; start of change due to meal #1 MTIME(2)=MTIME(1)+THETA(9) ; end of change due to meal #1 MTIME(3)=THETA(10) ; start of change due to meal #2 MTIME(4)=MTIME(3)+THETA(11) ; end of change due to meal #2 $DES FLAG1=MPAST(1)-MPAST(2) ; =1 only between MTIME(1) and MTIME(2) FLAG2=MPAST(3)-MPAST(4) ; =1 only between MTIME(3) and MTIME(4) FLAG=FLAG1+FLAG2 DADT(1)=-KA*A(1)+K41*A(4)*FLAG DADT(4)=K1G*A(2)-K41*A(4)*FLAG (or perhaps DADT(1)=-KA*A(1)+K41*A(4)*FLAG1+ a different term *FLAG2 DADT(4)=K1G*A(2)-K41*A(4)*FLAG1- a different term *FLAG2 if something different happens the second time period) You will have to be careful to constrain the thetas so that the intervals do not overlap. Another way to do it: NM-TRAN allows MTIME to be changed. Here, there are 3 EHC events. Its a very simple model, assumes the same length of time for each, and known time between events. Constants like 4 and 6 can of course be modelled and different lengths of time for the EHC events can be modelled $PK (NON-EVENT) STIME1=THETA(8) STIME2=STIME1+4 STIME3=STIME2+6 MTIME(1)=STIME1 IF (TIME.GE.STIME2) MTIME(1)=STIME2 IF (TIME.GE.STIME3) MTIME(1)=STIME3 MTIME(2)=MTIME(1)+THETA(9) (no change to $DES block) There are *lots* of ways this can be done. I hope this gives you a reasonable start. Id' rather someone in the nmusers group work out the details with real data, and let the others know, so that I can bow out of this thread and resume lurking. On Thu, 04 Dec 2008 14:06:27 -0500, Sam Liao [EMAIL PROTECTED] said: Dear Alison: Thanks for let us know this new feature in nm 6. I have been working on EHC modeling for single dose as well as multiple dose pk data. I have some questions on how to use this new feature. How do we define the FLAG when we also have MTIME(3), MTIME(4), MTIME(5) and MTIME(6)? We observed one peak after each meals and there were three meals each day. Best regards, Sam Liao Pharmax Research Dear Sam and Ayyappa, The postings that Sam mentioned are obsolete. The first of the model time examples (help mtime) suggests a better technique for modelling EHC using MTIME parameters, as follows: Enterohepatic Recycling This fragment of abbreviated code may be used to model EHC. The transfer of drug from compt. 4 to 1 is controlled by FLAG, which is 1 between the times specified by MTIME(1) and MTIME(2), and is 0 otherwise. $PK MTIME(1)=THETA(8) MTIME(2)=MTIME(1)+THETA(9) $DES FLAG=MPAST(1)-MPAST(2) DADT(1)=-KA*A(1)+K41*A(4)*FLAG DADT(4)=K1G*A(2)-K41*A(4)*FLAG From Intro.to NONMEM VI guide: There is a new feature: model event times. These are additional PK parameters MTIME(i) defined in the PK routine or $PK block. A model event time, like an absorption lag time, defines a time to which the system is advanced, but whose value usually cannot be known in advance. When the time is reached, certain indicator variables are set and a call to PK is made. At this call PK, DES, AES and ERROR can use the indicator variables to change some aspect of the system, e.g., a term in a differential equation, or the rate of an infusion. Thus, a model event time can be used e.g. to mark the time at which the gall bladder begins to empty. A model event time could be implemented by using an absorption lag time, and this is what has been done until now, but doing this is somewhat clumsy. There may be up to PCT model event times, where PCT is a new installation parameter defined in SIZES. Its default value is 30. (See the MTIME and $PK and PRDPK1 and PRDPK2 Help Items and the MODEL TIME Example) On Thu, 04 Dec 2008 08:43:59 -0500, Sam Liao [EMAIL PROTECTED] said: Dear Ayyappa: I think you will find the following nmusers net post useful for your model. Alison had kindly provided some code for a EHC model. Best regards, Sam Liao Pharmax Research === *Enterohepatic Recirculation Model http://www.cognigencorp.com/nonmem/nm/98oct061998.html* *|... |*this compartment to the change-point. Based on these ideas, here's how I would modify Rik's code. The change also provides for the termination of *EHC http://www.cognigencorp.com/nonmem/nm/98oct061998.html#pgfId=424161*. If you want to let *EHC* continue indefinitely, delete compartment 6 and its dose, and the code involving ALAG6. 1) Add 2 more compartments to $MODEL:*| ...|* / http://www.cognigencorp.com/nonmem/nm/98oct061998.html/ 05/06/03, 19876 bytes