Dear NM users,
I'm working on a PK model in renal disease patients with hemodialysis. The
drug in healthy subjects is well described with a first-order absorption and
one-compartment disposition model. A third hemodialysis compartment was added;
CMT=3 or -3 were included in the data set to turn this compartment on and off.
However, the 3rd compartment did not seem to be turned off, based on the fact
that the same results were obtained whether I excluded the EVID==2 record or
not (corresponding to CMT==3 or -3). Both ADVAN6 and ADVAN7 provided the same
results as well. The code and partial data set are shown below. I'm wondering
if you can point me to the right direction. I'd really appreciate your input.
Thanks!
Best regards,
Xiao
$INPUT C ID DAT2=DROP TIME GROUP DV AMT MDV TYPE CMT EVID
$DATA .\DATA\FINAL\105RI101ESRDPK.CSV
IGNORE=C IGN(GROUP.NE.5) ;IGN(EVID.EQ.2)
$SUBROUTINES ADVAN7 ;ADVAN6 TOL=8
$MODEL
COMP=(DEPOT,INITIALOFF,DEFDOSE)
COMP=(CENTRAL,DEFOBS,NOOFF)
COMP=(HEMODIA,INITIALOFF)
$PK
K12=THETA(1)
K20=THETA(2)
K23=THETA(3)
K32=0
V2=THETA(4)*EXP(ETA(1))
S2=V2
$ERROR
Y=F*EXP(EPS(1))
IPRE=F
;$DES
;DADT(1)=-K12*A(1)
;DADT(2)=K12*A(1)-K23*A(2)-K20*A(2)
;DADT(3)=K23*A(2)
$THETA
(0,0.1) ;THETA1 K12
(0,0.05) ;THETA2 K20
(0,.102) ;THETA3 K23
(0,200000) ;THETA6 V2
$OMEGA
0.2
$SIGMA
0.2
$ESTIMATION MAXEVAL=9999 METH=COND PRINT=5 MSFO=ESRD.MSF FILE=ESRD.EXT
C,ID,DATE,TIME,GROUP,CONC,AMT,MDV,TYPE,CMT,EVID
,102001,2010/05/04,8:35,2,0,6.3e+07,1,1,1,1
,102001,2010/05/04,8:35,2,0,0,1,1,-3,2
,102001,2010/05/04,14:39,2,177,0,0,1,2,0
,102001,2010/05/04,20:35,2,190,0,0,1,2,0
,102001,2010/05/05,08:35,2,144,0,0,1,2,0
,102001,2010/05/05,20:35,2,145,0,0,1,2,0
,102001,2010/05/06,08:37,2,135,0,0,1,2,0
,102001,2010/05/07,08:41,2,139,0,0,1,2,0
,102001,2010/05/08,08:35,2,177,0,0,1,2,0
,102001,2010/05/11,08:35,2,82.2,0,0,1,2,0
,102002,2010/06/30,8:00,2,0,1.25e+08,1,1,1,1
,102002,2010/06/30,8:00,2,0,0,1,1,-3,2
,102002,2010/06/30,14:03,2,416,0,0,1,2,0
,102002,2010/06/30,21:00,2,727,0,0,1,2,0
,102002,2010/07/01,08:21,2,1040,0,0,1,2,0
,102002,2010/07/01,20:00,2,1070,0,0,1,2,0
,102002,2010/07/02,08:06,2,719,0,0,1,2,0
,102002,2010/07/03,08:00,2,580,0,0,1,2,0
,102002,2010/07/04,08:00,2,518,0,0,1,2,0
,102002,2010/07/07,08:00,2,127,0,0,1,2,0
,102002,2010/07/10,08:00,2,35.2,0,0,1,2,0
,102002,2010/07/14,08:08,2,30,0,0,2,2,0
,102002,2010/07/17,08:00,2,30,0,0,2,2,0
,102002,2010/07/21,08:00,2,30,0,0,2,2,0
,102002,2010/07/23,15:05,2,30,0,0,2,2,0
,102002,2010/07/28,08:21,2,30,0,0,2,2,0
,102003,2010/08/06,8:35,3,0,1.25e+08,1,1,1,1
,102003,2010/08/06,8:35,3,0,0,1,1,-3,2
,102003,2010/08/06,14:35,3,132,0,0,1,2,0
,102003,2010/08/06,20:35,3,189,0,0,1,2,0
,102003,2010/08/07,08:35,3,210,0,0,1,2,0
,102003,2010/08/07,20:35,3,246,0,0,1,2,0
,102003,2010/08/08,08:35,3,221,0,0,1,2,0
,102003,2010/08/09,08:35,3,236,0,0,1,2,0
,102003,2010/08/10,08:35,3,180,0,0,1,2,0
,102003,2010/08/13,08:35,3,55.9,0,0,1,2,0
,102004,2010/08/31,7:40,3,0,1.25e+08,1,1,1,1
,102004,2010/08/31,7:40,3,0,0,1,1,-3,2
,102004,2010/08/31,13:52,3,309,0,0,1,2,0
,102004,2010/08/31,19:40,3,252,0,0,1,2,0
,102004,2010/09/01,07:40,3,224,0,0,1,2,0
,102004,2010/09/01,19:43,3,265,0,0,1,2,0
,102004,2010/09/02,07:40,3,306,0,0,1,2,0
,102004,2010/09/03,07:40,3,328,0,0,1,2,0
,102004,2010/09/04,07:40,3,206,0,0,1,2,0
,102004,2010/09/07,07:40,3,37.6,0,0,1,2,0
Modeling Hemodialysis clearance
9 messages
5 people
Latest: Jul 27, 2011
Xiao Hu,
I think it may be a problem with identifiability. It can't separate the definition of K23 from K20 unless there are measurements during elimination for hemo. patients off dialysis and on dialysis.
Thoughts:
(1) Try making K20=0 for hemodialysis patients
Assumes: no elimination except during hemodialysis via K23
(2) Estimate a different theta for K20 in hemodialysis patients since it should be different for them (bi-modal distribution) Assumes: very small elimination from central & with additive elimination from hemodialysis via K23.
Regards,
Luann Phillips
Director, PK/PD
Cognigen Corporation
Xiao Hu wrote:
> Dear NM users,
>
> I’m working on a PK model in renal disease patients with hemodialysis. The drug in healthy subjects is well described with a first-order absorption and one-compartment disposition model. A third hemodialysis compartment was added; CMT=3 or -3 were included in the data set to turn this compartment on and off. However, the 3rd compartment did not seem to be turned off, based on the fact that the same results were obtained whether I excluded the EVID==2 record or not (corresponding to CMT==3 or -3). Both ADVAN6 and ADVAN7 provided the same results as well. The code and partial data set are shown below. I’m wondering if you can point me to the right direction. I’d really appreciate your input. Thanks!
>
> Best regards,
>
> Xiao
>
> $INPUT C ID DAT2=DROP TIME GROUP DV AMT MDV TYPE CMT EVID
>
> $DATA .\DATA\FINAL\105RI101ESRDPK.CSV
>
> IGNORE=C IGN(GROUP.NE.5) ;IGN(EVID.EQ.2)
>
> $SUBROUTINES ADVAN7 ;ADVAN6 TOL=8
>
> $MODEL
>
> COMP=(DEPOT,INITIALOFF,DEFDOSE)
>
> COMP=(CENTRAL,DEFOBS,NOOFF)
>
> COMP=(HEMODIA,INITIALOFF)
>
> $PK
>
> K12=THETA(1)
>
> K20=THETA(2)
>
> K23=THETA(3)
>
> K32=0
>
> V2=THETA(4)*EXP(ETA(1))
>
> S2=V2
>
> $ERROR
>
> Y=F*EXP(EPS(1))
>
> IPRE=F
>
> ;$DES
>
> ;DADT(1)=-K12*A(1)
>
> ;DADT(2)=K12*A(1)-K23*A(2)-K20*A(2)
>
> ;DADT(3)=K23*A(2)
>
> $THETA
>
> (0,0.1) ;THETA1 K12
>
> (0,0.05) ;THETA2 K20
>
> (0,.102) ;THETA3 K23
>
> (0,200000) ;THETA6 V2
>
> $OMEGA
>
> 0.2
>
> $SIGMA
>
> 0.2
>
> $ESTIMATION MAXEVAL=9999 METH=COND PRINT=5 MSFO=ESRD.MSF FILE=ESRD.EXT
>
> C,ID,DATE,TIME,GROUP,CONC,AMT,MDV,TYPE,CMT,EVID
>
> ,102001,2010/05/04,8:35,2,0,6.3e+07,1,1,1,1
>
> ,102001,2010/05/04,8:35,2,0,0,1,1,-3,2
>
> ,102001,2010/05/04,14:39,2,177,0,0,1,2,0
>
> ,102001,2010/05/04,20:35,2,190,0,0,1,2,0
>
> ,102001,2010/05/05,08:35,2,144,0,0,1,2,0
>
> ,102001,2010/05/05,20:35,2,145,0,0,1,2,0
>
> ,102001,2010/05/06,08:37,2,135,0,0,1,2,0
>
> ,102001,2010/05/07,08:41,2,139,0,0,1,2,0
>
> ,102001,2010/05/08,08:35,2,177,0,0,1,2,0
>
> ,102001,2010/05/11,08:35,2,82.2,0,0,1,2,0
>
> ,102002,2010/06/30,8:00,2,0,1.25e+08,1,1,1,1
>
> ,102002,2010/06/30,8:00,2,0,0,1,1,-3,2
>
> ,102002,2010/06/30,14:03,2,416,0,0,1,2,0
>
> ,102002,2010/06/30,21:00,2,727,0,0,1,2,0
>
> ,102002,2010/07/01,08:21,2,1040,0,0,1,2,0
>
> ,102002,2010/07/01,20:00,2,1070,0,0,1,2,0
>
> ,102002,2010/07/02,08:06,2,719,0,0,1,2,0
>
> ,102002,2010/07/03,08:00,2,580,0,0,1,2,0
>
> ,102002,2010/07/04,08:00,2,518,0,0,1,2,0
>
> ,102002,2010/07/07,08:00,2,127,0,0,1,2,0
>
> ,102002,2010/07/10,08:00,2,35.2,0,0,1,2,0
>
> ,102002,2010/07/14,08:08,2,30,0,0,2,2,0
>
> ,102002,2010/07/17,08:00,2,30,0,0,2,2,0
>
> ,102002,2010/07/21,08:00,2,30,0,0,2,2,0
>
> ,102002,2010/07/23,15:05,2,30,0,0,2,2,0
>
> ,102002,2010/07/28,08:21,2,30,0,0,2,2,0
>
> ,102003,2010/08/06,8:35,3,0,1.25e+08,1,1,1,1
>
> ,102003,2010/08/06,8:35,3,0,0,1,1,-3,2
>
> ,102003,2010/08/06,14:35,3,132,0,0,1,2,0
>
> ,102003,2010/08/06,20:35,3,189,0,0,1,2,0
>
> ,102003,2010/08/07,08:35,3,210,0,0,1,2,0
>
> ,102003,2010/08/07,20:35,3,246,0,0,1,2,0
>
> ,102003,2010/08/08,08:35,3,221,0,0,1,2,0
>
> ,102003,2010/08/09,08:35,3,236,0,0,1,2,0
>
> ,102003,2010/08/10,08:35,3,180,0,0,1,2,0
>
> ,102003,2010/08/13,08:35,3,55.9,0,0,1,2,0
>
> ,102004,2010/08/31,7:40,3,0,1.25e+08,1,1,1,1
>
> ,102004,2010/08/31,7:40,3,0,0,1,1,-3,2
>
> ,102004,2010/08/31,13:52,3,309,0,0,1,2,0
>
> ,102004,2010/08/31,19:40,3,252,0,0,1,2,0
>
> ,102004,2010/09/01,07:40,3,224,0,0,1,2,0
>
> ,102004,2010/09/01,19:43,3,265,0,0,1,2,0
>
> ,102004,2010/09/02,07:40,3,306,0,0,1,2,0
>
> ,102004,2010/09/03,07:40,3,328,0,0,1,2,0
>
> ,102004,2010/09/04,07:40,3,206,0,0,1,2,0
>
> ,102004,2010/09/07,07:40,3,37.6,0,0,1,2,0
Dear Xiao,
I don't think you need an extra compartment to model the hemodialysis
clearance. I would recommend the following.
$DES
DADT(1)=-K12*A(1)
DADT(2)=K12*A(1)-K20*A(2)-Switch*KHD*A(2)
Where KHD is the hemodialysis elimination rate constant and Switch is an
data item defined in the dataset. In the dataset the Switch value is zero at
the time of start of dialysis, and 1 at the end of dialysis. Also Switch
values should be zero for all events out of dialysis sessions and 1 for all
events within dialysis.
Jun Shen
Senior Pharmacokineticist
Seventh Wave Labs
Quoted reply history
On Wed, Jul 20, 2011 at 9:26 AM, Xiao Hu <[email protected]> wrote:
> Dear Luann,
>
> Thanks for your advice. I realized I did not include relevant data (Excel
> change my DATE format automatically; I had to use notepad and selected the
> wrong rows). The following the updated data. PK samples were collected one
> hour before hemodialysis and one hour after hemodialysis, as well as between
> two dialysis. This may address identifiability issue. But if the system
> does not turn off Compartment 3, the identifiability will be an issue.
>
> C,ID,DATE,TIME,GROUP,CONC,AMT,MDV,TYPE,CMT,EVID
> ,102006,2010/11/11,14:35,5,0,1.25e+08,1,1,1,1
> ,102006,2010/11/11,14:35,5,0,0,1,1,-3,2
> ,102006,2010/11/11,20:35,5,44.7,0,0,1,2,0
> ,102006,2010/11/12,02:35,5,71.9,0,0,1,2,0
> ,102006,2010/11/12,14:43,5,69.8,0,0,1,2,0
> ,102006,2010/11/13,02:35,5,122,0,0,1,2,0
> ,102006,2010/11/13,14:35,5,131,0,0,1,2,0
> ,102006,2010/11/14,08:55,5,132,0,0,1,2,0
> ,102006,2010/11/14,09:00,5,0,0,1,1,3,2
> ,102006,2010/11/14,13:40,5,0,0,1,1,-3,2
> ,102006,2010/11/14,14:35,5,89.8,0,0,1,2,0
> ,102006,2010/11/15,10:29,5,68.7,0,0,1,2,0
> ,102006,2010/11/16,17:30,5,0,0,1,1,3,2
> ,102006,2010/11/16,21:30,5,0,0,1,1,-3,2
> ,102006,2010/11/18,17:40,5,0,0,1,1,3,2
> ,102006,2010/11/18,23:40,5,0,0,1,1,-3,2
> ,102006,2010/11/19,00:43,5,30,0,0,2,2,0
> ,102006,2010/11/21,16:20,5,30,0,0,2,2,0
> ,102006,2010/11/21,17:25,5,0,0,1,1,3,2
> ,102006,2010/11/21,23:25,5,0,0,1,1,-3,2
> ,102006,2010/11/23,17:40,5,0,0,1,1,3,2
> ,102006,2010/11/23,23:41,5,0,0,1,1,-3,2
> ,102006,2010/11/25,06:00,5,0,0,1,1,3,2
> ,102006,2010/11/25,10:00,5,0,0,1,1,-3,2
> ,102006,2010/11/28,12:30,5,0,0,1,1,3,2
> ,102006,2010/11/28,17:02,5,0,0,1,1,-3,2
> ,102006,2010/11/30,19:00,5,0,0,1,1,3,2
> ,102006,2010/11/30,23:55,5,0,0,1,1,-3,2
> ,102006,2010/12/02,17:55,5,0,0,1,1,3,2
> ,102006,2010/12/02,23:55,5,0,0,1,1,-3,2
> ,102006,2010/12/05,17:25,5,0,0,1,1,3,2
> ,102006,2010/12/05,20:35,5,0,0,1,1,-3,2
> ,102006,2010/12/07,18:40,5,0,0,1,1,3,2
> ,102006,2010/12/07,23:57,5,0,0,1,1,-3,2
> ,102006,2010/12/09,17:55,5,0,0,1,1,3,2
> ,102006,2010/12/09,23:55,5,0,0,1,1,-3,2
> ,102006,2010/12/16,17:48,5,0,0,1,1,3,2
> ,102006,2010/12/16,23:48,5,0,0,1,1,-3,2
> ,102007,2010/11/13,14:17,5,0,1.25e+08,1,1,1,1
> ,102007,2010/11/13,14:17,5,0,0,1,1,-3,2
> ,102007,2010/11/13,20:17,5,394,0,0,1,2,0
> ,102007,2010/11/14,02:17,5,298,0,0,1,2,0
> ,102007,2010/11/14,14:17,5,532,0,0,1,2,0
> ,102007,2010/11/15,10:22,5,615,0,0,1,2,0
> ,102007,2010/11/15,14:25,5,686,0,0,1,2,0
> ,102007,2010/11/16,07:42,5,740,0,0,1,2,0
> ,102007,2010/11/16,07:43,5,0,0,1,1,3,2
> ,102007,2010/11/16,11:48,5,0,0,1,1,-3,2
> ,102007,2010/11/16,14:17,5,703,0,0,1,2,0
> ,102007,2010/11/17,14:20,5,530,0,0,1,2,0
> ,102007,2010/11/18,10:46,5,0,0,1,1,3,2
> ,102007,2010/11/18,14:51,5,0,0,1,1,-3,2
> ,102007,2010/11/20,10:15,5,165,0,0,1,2,0
> ,102007,2010/11/20,11:22,5,0,0,1,1,3,2
> ,102007,2010/11/20,15:24,5,0,0,1,1,-3,2
> ,102007,2010/11/20,16:00,5,157,0,0,1,2,0
> ,102007,2010/11/23,09:53,5,44.7,0,0,1,2,0
> ,102007,2010/11/23,10:46,5,0,0,1,1,3,2
> ,102007,2010/11/23,14:52,5,0,0,1,1,-3,2
> ,102007,2010/11/25,10:33,5,0,0,1,1,3,2
> ,102007,2010/11/25,14:48,5,0,0,1,1,-3,2
> ,102007,2010/11/27,11:09,5,0,0,1,1,3,2
> ,102007,2010/11/27,15:01,5,0,0,1,1,-3,2
> ,102007,2010/11/30,10:59,5,30,0,0,2,2,0
> ,102007,2010/11/30,12:27,5,0,0,1,1,3,2
> ,102007,2010/11/30,15:33,5,0,0,1,1,-3,2
> ,102007,2010/12/02,12:11,5,0,0,1,1,3,2
> ,102007,2010/12/02,16:17,5,0,0,1,1,-3,2
> ,102007,2010/12/04,11:20,5,30,0,0,2,2,0
> ,102007,2010/12/04,12:18,5,0,0,1,1,3,2
> ,102007,2010/12/04,15:59,5,0,0,1,1,-3,2
> ,102007,2010/12/07,10:20,5,30,0,0,2,2,0
> ,102007,2010/12/07,11:58,5,0,0,1,1,3,2
> ,102007,2010/12/07,16:06,5,0,0,1,1,-3,2
> ,102007,2010/12/09,11:02,5,0,0,1,1,3,2
> ,102007,2010/12/09,14:33,5,0,0,1,1,-3,2
> ,102007,2010/12/12,11:44,5,30,0,0,2,2,0
> ,102007,2010/12/14,10:58,5,0,0,1,1,3,2
> ,102007,2010/12/14,15:00,5,0,0,1,1,-3,2
> ,102007,2010/12/16,11:18,5,0,0,1,1,3,2
> ,102007,2010/12/16,14:50,5,0,0,1,1,-3,2
> ,102007,2010/12/18,10:56,5,0,0,1,1,3,2
> ,102007,2010/12/18,14:56,5,0,0,1,1,-3,2
> ,104006,2010/11/12,12:30,5,0,1.25e+08,1,1,1,1
> ,104006,2010/11/12,12:30,5,0,0,1,1,-3,2
> ,104006,2010/11/12,18:30,5,100,0,0,1,2,0
> ,104006,2010/11/13,00:30,5,177,0,0,1,2,0
> ,104006,2010/11/13,12:30,5,350,0,0,1,2,0
> ,104006,2010/11/13,18:30,5,415,0,0,1,2,0
> ,104006,2010/11/15,12:30,5,362,0,0,1,2,0
> ,104006,2010/11/15,12:45,5,0,0,1,1,3,2
> ,104006,2010/11/15,16:45,5,0,0,1,1,-3,2
> ,104006,2010/11/15,17:45,5,253,0,0,1,2,0
> ,104006,2010/11/16,12:30,5,164,0,0,1,2,0
> ,104006,2010/11/17,07:40,5,0,0,1,1,3,2
> ,104006,2010/11/17,11:44,5,0,0,1,1,-3,2
> ,104006,2010/11/17,13:40,5,88.7,0,0,1,2,0
> ,104006,2010/11/19,06:05,5,47.7,0,0,1,2,0
> ,104006,2010/11/19,07:41,5,0,0,1,1,3,2
> ,104006,2010/11/19,11:45,5,0,0,1,1,-3,2
> ,104006,2010/11/19,13:06,5,31.7,0,0,1,2,0
> ,104007,2010/11/13,12:40,5,0,1.25e+08,1,1,1,1
> ,104007,2010/11/13,12:40,5,0,0,1,1,-3,2
> ,104007,2010/11/13,18:40,5,173,0,0,1,2,0
> ,104007,2010/11/14,00:40,5,234,0,0,1,2,0
> ,104007,2010/11/14,12:45,5,254,0,0,1,2,0
> ,104007,2010/11/14,18:47,5,276,0,0,1,2,0
> ,104007,2010/11/15,12:40,5,276,0,0,1,2,0
> ,104007,2010/11/16,12:40,5,332,0,0,1,2,0
> ,104007,2010/11/16,12:55,5,0,0,1,1,3,2
> ,104007,2010/11/16,16:55,5,0,0,1,1,-3,2
> ,104007,2010/11/16,17:58,5,275,0,0,1,2,0
> ,104007,2010/11/18,06:47,5,228,0,0,1,2,0
> ,104007,2010/11/18,07:52,5,0,0,1,1,3,2
> ,104007,2010/11/18,11:58,5,0,0,1,1,-3,2
> ,104007,2010/11/18,13:06,5,158,0,0,1,2,0
> ,104007,2010/11/20,06:10,5,76.3,0,0,1,2,0
> ,104007,2010/11/20,07:10,5,0,0,1,1,3,2
> ,104007,2010/11/20,11:13,5,0,0,1,1,-3,2
> ,104007,2010/11/20,11:59,5,67.1,0,0,1,2,0
> ,104010,2011/04/29,12:42,5,0,1.25e+08,1,1,1,1
> ,104010,2011/04/29,12:42,5,0,0,1,1,-3,2
> ,104010,2011/04/29,18:50,5,119,0,0,1,2,0
> ,104010,2011/04/30,00:42,5,203,0,0,1,2,0
> ,104010,2011/04/30,12:42,5,197,0,0,1,2,0
> ,104010,2011/04/30,18:42,5,295,0,0,1,2,0
> ,104010,2011/05/01,12:42,5,224,0,0,1,2,0
> ,104010,2011/05/02,12:44,5,268,0,0,1,2,0
> ,104010,2011/05/02,17:57,5,216,0,0,1,2,0
> ,104010,2011/05/04,05:40,5,161,0,0,1,2,0
> ,104010,2011/05/04,12:40,5,110,0,0,1,2,0
> ,104010,2011/05/06,03:00,5,66.7,0,0,1,2,0
> ,104010,2011/05/06,11:36,5,44.5,0,0,1,2,0
> ,106009,2011/01/28,14:15,5,0,1.25e+08,1,1,1,1
> ,106009,2011/01/28,14:15,5,0,0,1,1,-3,2
> ,106009,2011/01/28,20:15,5,52.7,0,0,1,2,0
> ,106009,2011/01/29,02:15,5,74.6,0,0,1,2,0
> ,106009,2011/01/29,14:15,5,85.2,0,0,1,2,0
> ,106009,2011/01/30,02:15,5,94.6,0,0,1,2,0
> ,106009,2011/01/30,14:15,5,102,0,0,1,2,0
> ,106009,2011/01/31,12:48,5,138,0,0,1,2,0
> ,106009,2011/01/31,13:05,5,0,0,1,1,3,2
> ,106009,2011/01/31,17:05,5,0,0,1,1,-3,2
> ,106009,2011/01/31,18:12,5,105,0,0,1,2,0
> ,106009,2011/02/02,14:07,5,118,0,0,1,2,0
> ,106009,2011/02/02,16:50,5,0,0,1,1,3,2
> ,106009,2011/02/02,20:50,5,0,0,1,1,-3,2
> ,106009,2011/02/02,22:01,5,95.1,0,0,1,2,0
> ,106009,2011/02/04,13:34,5,72.9,0,0,1,2,0
> ,106009,2011/02/04,15:54,5,0,0,1,1,3,2
> ,106009,2011/02/04,20:06,5,0,0,1,1,-3,2
> ,106009,2011/02/04,21:18,5,60.3,0,0,1,2,0
> ,106009,2011/02/07,00:50,5,0,0,1,1,-3,2
> ,106009,2011/02/07,11:02,5,39.4,0,0,1,2,0
> ,106009,2011/02/07,17:20,5,0,0,1,1,3,2
> ,106009,2011/02/09,01:05,5,0,0,1,1,-3,2
> ,106009,2011/02/09,17:05,5,0,0,1,1,3,2
> ,106009,2011/02/11,01:23,5,0,0,1,1,-3,2
> ,106009,2011/02/11,08:49,5,30,0,0,2,2,0
> ,106009,2011/02/11,17:15,5,0,0,1,1,3,2
> ,106009,2011/02/14,01:17,5,0,0,1,1,-3,2
> ,106009,2011/02/14,08:44,5,30,0,0,2,2,0
> ,106009,2011/02/14,17:17,5,0,0,1,1,3,2
> ,106009,2011/02/16,01:20,5,0,0,1,1,-3,2
> ,106009,2011/02/16,17:20,5,0,0,1,1,3,2
> ,106009,2011/02/18,01:08,5,0,0,1,1,-3,2
> ,106009,2011/02/18,17:02,5,0,0,1,1,3,2
> ,106009,2011/02/21,01:04,5,0,0,1,1,-3,2
> ,106009,2011/02/21,17:04,5,0,0,1,1,3,2
> ,106009,2011/02/23,17:39,5,0,0,1,1,3,2
> ,106009,2011/02/23,21:45,5,0,0,1,1,-3,2
> ,106009,2011/02/25,16:55,5,0,0,1,1,3,2
> ,106009,2011/02/25,20:56,5,0,0,1,1,-3,2
> ,106009,2011/02/28,01:06,5,0,0,1,1,-3,2
> ,106009,2011/02/28,17:21,5,0,0,1,1,3,2
> ,106009,2011/03/02,01:01,5,0,0,1,1,-3,2
> ,106009,2011/03/02,17:05,5,0,0,1,1,3,2
> -----Original Message-----
> From: Luann Phillips [mailto:[email protected]]
> Sent: Wednesday, July 20, 2011 9:45 AM
> To: Xiao Hu
> Cc: [email protected]
> Subject: Re: [NMusers] Modeling Hemodialysis clearance
>
> Xiao Hu,
>
> I think it may be a problem with identifiability. It can't separate the
> definition of K23 from K20 unless there are measurements during elimination
> for hemo. patients off dialysis and on dialysis.
>
> Thoughts:
> (1) Try making K20=0 for hemodialysis patients
> Assumes: no elimination except during hemodialysis via K23
> (2) Estimate a different theta for K20 in hemodialysis patients since it
> should be different for them (bi-modal distribution)
> Assumes: very small elimination from central & with additive elimination
> from hemodialysis via K23.
>
> Regards,
>
> Luann Phillips
> Director, PK/PD
> Cognigen Corporation
>
> Xiao Hu wrote:
> > Dear NM users,
> >
> >
> >
> > I'm working on a PK model in renal disease patients with hemodialysis.
> > The drug in healthy subjects is well described with a first-order
> > absorption and one-compartment disposition model. A third
> > hemodialysis compartment was added; CMT=3 or -3 were included in the
> > data set to turn this compartment on and off. However, the 3rd
> > compartment did not seem to be turned off, based on the fact that the
> > same results were obtained whether I excluded the EVID==2 record or
> > not (corresponding to CMT==3 or -3). Both ADVAN6 and ADVAN7 provided
> > the same results as well. The code and partial data set are shown
> > below. I'm wondering if you can point me to the right direction. I'd
> really appreciate your input. Thanks!
> >
> >
> >
> > Best regards,
> >
> > Xiao
> >
> >
> >
> > $INPUT C ID DAT2=DROP TIME GROUP DV AMT MDV TYPE CMT EVID
> >
> >
> >
> > $DATA .\DATA\FINAL\105RI101ESRDPK.CSV
> >
> > IGNORE=C IGN(GROUP.NE.5) ;IGN(EVID.EQ.2)
> >
> >
> >
> > $SUBROUTINES ADVAN7 ;ADVAN6 TOL=8
> >
> >
> >
> > $MODEL
> >
> > COMP=(DEPOT,INITIALOFF,DEFDOSE)
> >
> > COMP=(CENTRAL,DEFOBS,NOOFF)
> >
> > COMP=(HEMODIA,INITIALOFF)
> >
> >
> >
> > $PK
> >
> > K12=THETA(1)
> >
> > K20=THETA(2)
> >
> > K23=THETA(3)
> >
> > K32=0
> >
> > V2=THETA(4)*EXP(ETA(1))
> >
> > S2=V2
> >
> > $ERROR
> >
> > Y=F*EXP(EPS(1))
> >
> > IPRE=F
> >
> >
> >
> > ;$DES
> >
> > ;DADT(1)=-K12*A(1)
> >
> > ;DADT(2)=K12*A(1)-K23*A(2)-K20*A(2)
> >
> > ;DADT(3)=K23*A(2)
> >
> >
> >
> > $THETA
> >
> > (0,0.1) ;THETA1 K12
> >
> > (0,0.05) ;THETA2 K20
> >
> > (0,.102) ;THETA3 K23
> >
> > (0,200000) ;THETA6 V2
> >
> >
> >
> > $OMEGA
> >
> > 0.2
> >
> > $SIGMA
> >
> > 0.2
> >
> >
> >
> > $ESTIMATION MAXEVAL=9999 METH=COND PRINT=5 MSFO=ESRD.MSF
> > FILE=ESRD.EXT
> >
>
>
> > ,102001,2010/05/11,08:35,2,82.2,0,0,1,2,0
> >
> > ,102002,2010/06/30,8:00,2,0,1.25e+08,1,1,1,1
> >
> > ,102002,2010/06/30,8:00,2,0,0,1,1,-3,2
> >
> > ,102002,2010/06/30,14:03,2,416,0,0,1,2,0
> >
> > ,102002,2010/06/30,21:00,2,727,0,0,1,2,0
> >
> > ,102002,2010/07/01,08:21,2,1040,0,0,1,2,0
> >
> > ,102002,2010/07/01,20:00,2,1070,0,0,1,2,0
> >
> > ,102002,2010/07/02,08:06,2,719,0,0,1,2,0
> >
> > ,102002,2010/07/03,08:00,2,580,0,0,1,2,0
> >
> > ,102002,2010/07/04,08:00,2,518,0,0,1,2,0
> >
> > ,102002,2010/07/07,08:00,2,127,0,0,1,2,0
> >
> > ,102002,2010/07/10,08:00,2,35.2,0,0,1,2,0
> >
> > ,102002,2010/07/14,08:08,2,30,0,0,2,2,0
> >
> > ,102002,2010/07/17,08:00,2,30,0,0,2,2,0
> >
> > ,102002,2010/07/21,08:00,2,30,0,0,2,2,0
> >
> > ,102002,2010/07/23,15:05,2,30,0,0,2,2,0
> >
> > ,102002,2010/07/28,08:21,2,30,0,0,2,2,0
> >
> > ,102003,2010/08/06,8:35,3,0,1.25e+08,1,1,1,1
> >
> > ,102003,2010/08/06,8:35,3,0,0,1,1,-3,2
> >
> > ,102003,2010/08/06,14:35,3,132,0,0,1,2,0
> >
> > ,102003,2010/08/06,20:35,3,189,0,0,1,2,0
> >
> > ,102003,2010/08/07,08:35,3,210,0,0,1,2,0
> >
> > ,102003,2010/08/07,20:35,3,246,0,0,1,2,0
> >
> > ,102003,2010/08/08,08:35,3,221,0,0,1,2,0
> >
> > ,102003,2010/08/09,08:35,3,236,0,0,1,2,0
> >
> > ,102003,2010/08/10,08:35,3,180,0,0,1,2,0
> >
> > ,102003,2010/08/13,08:35,3,55.9,0,0,1,2,0
> >
> > ,102004,2010/08/31,7:40,3,0,1.25e+08,1,1,1,1
> >
> > ,102004,2010/08/31,7:40,3,0,0,1,1,-3,2
> >
> > ,102004,2010/08/31,13:52,3,309,0,0,1,2,0
> >
> > ,102004,2010/08/31,19:40,3,252,0,0,1,2,0
> >
> > ,102004,2010/09/01,07:40,3,224,0,0,1,2,0
> >
> > ,102004,2010/09/01,19:43,3,265,0,0,1,2,0
> >
> > ,102004,2010/09/02,07:40,3,306,0,0,1,2,0
> >
> > ,102004,2010/09/03,07:40,3,328,0,0,1,2,0
> >
> > ,102004,2010/09/04,07:40,3,206,0,0,1,2,0
> >
> > ,102004,2010/09/07,07:40,3,37.6,0,0,1,2,0
> >
>
>
Dear Xiao,
I agree with Jun's advise. You previous setting should not work as
when you switch the compartment 3 off nothing changes for
compartment 2, k23 stays the same as it was.
Regards,
Katya
Ekaterina Gibiansky, Ph.D.
CEO&CSO, QuantPharm LLC
Web: www.quantpharm.com
Email: [email protected]
Tel: (301)-717-7032
On 7/20/2011 11:20 AM, Jun Shen wrote:
Dear Xiao,
I don't think you need an extra compartment to model the
hemodialysis clearance. I would recommend the following.
$DES
DADT(1)=-K12*A(1)
DADT(2)=K12*A(1)-K20*A(2)-Switch*KHD*A(2)
Where KHD is the hemodialysis elimination rate constant and
Switch is an data item defined in the dataset. In the dataset
the Switch value is zero at the time of start of dialysis, and 1
at the end of dialysis. Also Switch values should be zero for
all events out of dialysis sessions and 1 for all events within
dialysis.
Jun Shen
Senior Pharmacokineticist
Seventh Wave Labs
On Wed, Jul 20, 2011 at 9:26 AM, Xiao Hu
< [email protected] >
wrote:
Dear Luann,
Thanks for your advice. I realized I did not include relevant
data (Excel change my DATE format automatically; I had to use
notepad and selected the wrong rows). The following the
updated data. PK samples were collected one hour before
hemodialysis and one hour after hemodialysis, as well as
between two dialysis. This may address identifiability issue.
But if the system does not turn off Compartment 3, the
identifiability will be an issue.
C,ID,DATE,TIME,GROUP,CONC,AMT,MDV,TYPE,CMT,EVID
,102006,2010/11/11,14:35,5,0,1.25e+08,1,1,1,1
,102006,2010/11/11,14:35,5,0,0,1,1,-3,2
,102006,2010/11/11,20:35,5,44.7,0,0,1,2,0
,102006,2010/11/12,02:35,5,71.9,0,0,1,2,0
,102006,2010/11/12,14:43,5,69.8,0,0,1,2,0
,102006,2010/11/13,02:35,5,122,0,0,1,2,0
,102006,2010/11/13,14:35,5,131,0,0,1,2,0
,102006,2010/11/14,08:55,5,132,0,0,1,2,0
,102006,2010/11/14,09:00,5,0,0,1,1,3,2
,102006,2010/11/14,13:40,5,0,0,1,1,-3,2
,102006,2010/11/14,14:35,5,89.8,0,0,1,2,0
,102006,2010/11/15,10:29,5,68.7,0,0,1,2,0
,102006,2010/11/16,17:30,5,0,0,1,1,3,2
,102006,2010/11/16,21:30,5,0,0,1,1,-3,2
,102006,2010/11/18,17:40,5,0,0,1,1,3,2
,102006,2010/11/18,23:40,5,0,0,1,1,-3,2
,102006,2010/11/19,00:43,5,30,0,0,2,2,0
,102006,2010/11/21,16:20,5,30,0,0,2,2,0
,102006,2010/11/21,17:25,5,0,0,1,1,3,2
,102006,2010/11/21,23:25,5,0,0,1,1,-3,2
,102006,2010/11/23,17:40,5,0,0,1,1,3,2
,102006,2010/11/23,23:41,5,0,0,1,1,-3,2
,102006,2010/11/25,06:00,5,0,0,1,1,3,2
,102006,2010/11/25,10:00,5,0,0,1,1,-3,2
,102006,2010/11/28,12:30,5,0,0,1,1,3,2
,102006,2010/11/28,17:02,5,0,0,1,1,-3,2
,102006,2010/11/30,19:00,5,0,0,1,1,3,2
,102006,2010/11/30,23:55,5,0,0,1,1,-3,2
,102006,2010/12/02,17:55,5,0,0,1,1,3,2
,102006,2010/12/02,23:55,5,0,0,1,1,-3,2
,102006,2010/12/05,17:25,5,0,0,1,1,3,2
,102006,2010/12/05,20:35,5,0,0,1,1,-3,2
,102006,2010/12/07,18:40,5,0,0,1,1,3,2
,102006,2010/12/07,23:57,5,0,0,1,1,-3,2
,102006,2010/12/09,17:55,5,0,0,1,1,3,2
,102006,2010/12/09,23:55,5,0,0,1,1,-3,2
,102006,2010/12/16,17:48,5,0,0,1,1,3,2
,102006,2010/12/16,23:48,5,0,0,1,1,-3,2
,102007,2010/11/13,14:17,5,0,1.25e+08,1,1,1,1
,102007,2010/11/13,14:17,5,0,0,1,1,-3,2
,102007,2010/11/13,20:17,5,394,0,0,1,2,0
,102007,2010/11/14,02:17,5,298,0,0,1,2,0
,102007,2010/11/14,14:17,5,532,0,0,1,2,0
,102007,2010/11/15,10:22,5,615,0,0,1,2,0
,102007,2010/11/15,14:25,5,686,0,0,1,2,0
,102007,2010/11/16,07:42,5,740,0,0,1,2,0
,102007,2010/11/16,07:43,5,0,0,1,1,3,2
,102007,2010/11/16,11:48,5,0,0,1,1,-3,2
,102007,2010/11/16,14:17,5,703,0,0,1,2,0
,102007,2010/11/17,14:20,5,530,0,0,1,2,0
,102007,2010/11/18,10:46,5,0,0,1,1,3,2
,102007,2010/11/18,14:51,5,0,0,1,1,-3,2
,102007,2010/11/20,10:15,5,165,0,0,1,2,0
,102007,2010/11/20,11:22,5,0,0,1,1,3,2
,102007,2010/11/20,15:24,5,0,0,1,1,-3,2
,102007,2010/11/20,16:00,5,157,0,0,1,2,0
,102007,2010/11/23,09:53,5,44.7,0,0,1,2,0
,102007,2010/11/23,10:46,5,0,0,1,1,3,2
,102007,2010/11/23,14:52,5,0,0,1,1,-3,2
,102007,2010/11/25,10:33,5,0,0,1,1,3,2
,102007,2010/11/25,14:48,5,0,0,1,1,-3,2
,102007,2010/11/27,11:09,5,0,0,1,1,3,2
,102007,2010/11/27,15:01,5,0,0,1,1,-3,2
,102007,2010/11/30,10:59,5,30,0,0,2,2,0
,102007,2010/11/30,12:27,5,0,0,1,1,3,2
,102007,2010/11/30,15:33,5,0,0,1,1,-3,2
,102007,2010/12/02,12:11,5,0,0,1,1,3,2
,102007,2010/12/02,16:17,5,0,0,1,1,-3,2
,102007,2010/12/04,11:20,5,30,0,0,2,2,0
,102007,2010/12/04,12:18,5,0,0,1,1,3,2
,102007,2010/12/04,15:59,5,0,0,1,1,-3,2
,102007,2010/12/07,10:20,5,30,0,0,2,2,0
,102007,2010/12/07,11:58,5,0,0,1,1,3,2
,102007,2010/12/07,16:06,5,0,0,1,1,-3,2
,102007,2010/12/09,11:02,5,0,0,1,1,3,2
,102007,2010/12/09,14:33,5,0,0,1,1,-3,2
,102007,2010/12/12,11:44,5,30,0,0,2,2,0
,102007,2010/12/14,10:58,5,0,0,1,1,3,2
,102007,2010/12/14,15:00,5,0,0,1,1,-3,2
,102007,2010/12/16,11:18,5,0,0,1,1,3,2
,102007,2010/12/16,14:50,5,0,0,1,1,-3,2
,102007,2010/12/18,10:56,5,0,0,1,1,3,2
,102007,2010/12/18,14:56,5,0,0,1,1,-3,2
,104006,2010/11/12,12:30,5,0,1.25e+08,1,1,1,1
,104006,2010/11/12,12:30,5,0,0,1,1,-3,2
,104006,2010/11/12,18:30,5,100,0,0,1,2,0
,104006,2010/11/13,00:30,5,177,0,0,1,2,0
,104006,2010/11/13,12:30,5,350,0,0,1,2,0
,104006,2010/11/13,18:30,5,415,0,0,1,2,0
,104006,2010/11/15,12:30,5,362,0,0,1,2,0
,104006,2010/11/15,12:45,5,0,0,1,1,3,2
,104006,2010/11/15,16:45,5,0,0,1,1,-3,2
,104006,2010/11/15,17:45,5,253,0,0,1,2,0
,104006,2010/11/16,12:30,5,164,0,0,1,2,0
,104006,2010/11/17,07:40,5,0,0,1,1,3,2
,104006,2010/11/17,11:44,5,0,0,1,1,-3,2
,104006,2010/11/17,13:40,5,88.7,0,0,1,2,0
,104006,2010/11/19,06:05,5,47.7,0,0,1,2,0
,104006,2010/11/19,07:41,5,0,0,1,1,3,2
,104006,2010/11/19,11:45,5,0,0,1,1,-3,2
,104006,2010/11/19,13:06,5,31.7,0,0,1,2,0
,104007,2010/11/13,12:40,5,0,1.25e+08,1,1,1,1
,104007,2010/11/13,12:40,5,0,0,1,1,-3,2
,104007,2010/11/13,18:40,5,173,0,0,1,2,0
,104007,2010/11/14,00:40,5,234,0,0,1,2,0
,104007,2010/11/14,12:45,5,254,0,0,1,2,0
,104007,2010/11/14,18:47,5,276,0,0,1,2,0
,104007,2010/11/15,12:40,5,276,0,0,1,2,0
,104007,2010/11/16,12:40,5,332,0,0,1,2,0
,104007,2010/11/16,12:55,5,0,0,1,1,3,2
,104007,2010/11/16,16:55,5,0,0,1,1,-3,2
,104007,2010/11/16,17:58,5,275,0,0,1,2,0
,104007,2010/11/18,06:47,5,228,0,0,1,2,0
,104007,2010/11/18,07:52,5,0,0,1,1,3,2
,104007,2010/11/18,11:58,5,0,0,1,1,-3,2
,104007,2010/11/18,13:06,5,158,0,0,1,2,0
,104007,2010/11/20,06:10,5,76.3,0,0,1,2,0
,104007,2010/11/20,07:10,5,0,0,1,1,3,2
,104007,2010/11/20,11:13,5,0,0,1,1,-3,2
,104007,2010/11/20,11:59,5,67.1,0,0,1,2,0
,104010,2011/04/29,12:42,5,0,1.25e+08,1,1,1,1
,104010,2011/04/29,12:42,5,0,0,1,1,-3,2
,104010,2011/04/29,18:50,5,119,0,0,1,2,0
,104010,2011/04/30,00:42,5,203,0,0,1,2,0
,104010,2011/04/30,12:42,5,197,0,0,1,2,0
,104010,2011/04/30,18:42,5,295,0,0,1,2,0
,104010,2011/05/01,12:42,5,224,0,0,1,2,0
,104010,2011/05/02,12:44,5,268,0,0,1,2,0
,104010,2011/05/02,17:57,5,216,0,0,1,2,0
,104010,2011/05/04,05:40,5,161,0,0,1,2,0
,104010,2011/05/04,12:40,5,110,0,0,1,2,0
,104010,2011/05/06,03:00,5,66.7,0,0,1,2,0
,104010,2011/05/06,11:36,5,44.5,0,0,1,2,0
,106009,2011/01/28,14:15,5,0,1.25e+08,1,1,1,1
,106009,2011/01/28,14:15,5,0,0,1,1,-3,2
,106009,2011/01/28,20:15,5,52.7,0,0,1,2,0
,106009,2011/01/29,02:15,5,74.6,0,0,1,2,0
,106009,2011/01/29,14:15,5,85.2,0,0,1,2,0
,106009,2011/01/30,02:15,5,94.6,0,0,1,2,0
,106009,2011/01/30,14:15,5,102,0,0,1,2,0
,106009,2011/01/31,12:48,5,138,0,0,1,2,0
,106009,2011/01/31,13:05,5,0,0,1,1,3,2
,106009,2011/01/31,17:05,5,0,0,1,1,-3,2
,106009,2011/01/31,18:12,5,105,0,0,1,2,0
,106009,2011/02/02,14:07,5,118,0,0,1,2,0
,106009,2011/02/02,16:50,5,0,0,1,1,3,2
,106009,2011/02/02,20:50,5,0,0,1,1,-3,2
,106009,2011/02/02,22:01,5,95.1,0,0,1,2,0
,106009,2011/02/04,13:34,5,72.9,0,0,1,2,0
,106009,2011/02/04,15:54,5,0,0,1,1,3,2
,106009,2011/02/04,20:06,5,0,0,1,1,-3,2
,106009,2011/02/04,21:18,5,60.3,0,0,1,2,0
,106009,2011/02/07,00:50,5,0,0,1,1,-3,2
,106009,2011/02/07,11:02,5,39.4,0,0,1,2,0
,106009,2011/02/07,17:20,5,0,0,1,1,3,2
,106009,2011/02/09,01:05,5,0,0,1,1,-3,2
,106009,2011/02/09,17:05,5,0,0,1,1,3,2
,106009,2011/02/11,01:23,5,0,0,1,1,-3,2
,106009,2011/02/11,08:49,5,30,0,0,2,2,0
,106009,2011/02/11,17:15,5,0,0,1,1,3,2
,106009,2011/02/14,01:17,5,0,0,1,1,-3,2
,106009,2011/02/14,08:44,5,30,0,0,2,2,0
,106009,2011/02/14,17:17,5,0,0,1,1,3,2
,106009,2011/02/16,01:20,5,0,0,1,1,-3,2
,106009,2011/02/16,17:20,5,0,0,1,1,3,2
,106009,2011/02/18,01:08,5,0,0,1,1,-3,2
,106009,2011/02/18,17:02,5,0,0,1,1,3,2
,106009,2011/02/21,01:04,5,0,0,1,1,-3,2
,106009,2011/02/21,17:04,5,0,0,1,1,3,2
,106009,2011/02/23,17:39,5,0,0,1,1,3,2
,106009,2011/02/23,21:45,5,0,0,1,1,-3,2
,106009,2011/02/25,16:55,5,0,0,1,1,3,2
,106009,2011/02/25,20:56,5,0,0,1,1,-3,2
,106009,2011/02/28,01:06,5,0,0,1,1,-3,2
,106009,2011/02/28,17:21,5,0,0,1,1,3,2
,106009,2011/03/02,01:01,5,0,0,1,1,-3,2
,106009,2011/03/02,17:05,5,0,0,1,1,3,2
-----Original Message-----
Quoted reply history
From: Luann Phillips [mailto: [email protected] ]
Sent: Wednesday, July 20, 2011 9:45 AM
To: Xiao Hu
Cc: [email protected]
Subject: Re: [NMusers] Modeling Hemodialysis clearance
Xiao Hu,
I think it may be a problem with identifiability. It can't
separate the definition of K23 from K20 unless there are
measurements during elimination for hemo. patients off
dialysis and on dialysis.
Thoughts:
(1) Try making K20=0 for hemodialysis patients
Assumes: no elimination except during hemodialysis via K23
(2) Estimate a different theta for K20 in hemodialysis
patients since it should be different for them (bi-modal
distribution)
Assumes: very small elimination from central & with
additive elimination from hemodialysis via K23.
Regards,
Luann Phillips
Director, PK/PD
Cognigen Corporation
Xiao Hu wrote:
> Dear NM users,
>
>
>
> I'm working on a PK model in renal disease patients
with hemodialysis.
> The drug in healthy subjects is well described with a
first-order
> absorption and one-compartment disposition model. A
third
> hemodialysis compartment was added; CMT=3 or -3 were
included in the
> data set to turn this compartment on and off.
However, the 3rd
> compartment did not seem to be turned off, based on
the fact that the
> same results were obtained whether I excluded the
EVID==2 record or
> not (corresponding to CMT==3 or -3). Both ADVAN6 and
ADVAN7 provided
> the same results as well. The code and partial data
set are shown
> below. I'm wondering if you can point me to the
right direction. I'd really appreciate your input.
Thanks!
>
>
>
> Best regards,
>
> Xiao
>
>
>
> $INPUT C ID DAT2=DROP TIME GROUP DV AMT MDV TYPE CMT
EVID
>
>
>
> $DATA .\DATA\FINAL\105RI101ESRDPK.CSV
>
> IGNORE=C IGN(GROUP.NE.5) ;IGN(EVID.EQ.2)
>
>
>
> $SUBROUTINES ADVAN7 ;ADVAN6 TOL=8
>
>
>
> $MODEL
>
> COMP=(DEPOT,INITIALOFF,DEFDOSE)
>
> COMP=(CENTRAL,DEFOBS,NOOFF)
>
> COMP=(HEMODIA,INITIALOFF)
>
>
>
> $PK
>
> K12=THETA(1)
>
> K20=THETA(2)
>
> K23=THETA(3)
>
> K32=0
>
> V2=THETA(4)*EXP(ETA(1))
>
> S2=V2
>
> $ERROR
>
> Y=F*EXP(EPS(1))
>
> IPRE=F
>
>
>
> ;$DES
>
> ;DADT(1)=-K12*A(1)
>
> ;DADT(2)=K12*A(1)-K23*A(2)-K20*A(2)
>
> ;DADT(3)=K23*A(2)
>
>
>
> $THETA
>
> (0,0.1) ;THETA1 K12
>
> (0,0.05) ;THETA2 K20
>
> (0,.102) ;THETA3 K23
>
> (0,200000) ;THETA6 V2
>
>
>
> $OMEGA
>
> 0.2
>
> $SIGMA
>
> 0.2
>
>
>
> $ESTIMATION MAXEVAL=9999 METH=COND PRINT=5
MSFO=ESRD.MSF
> FILE=ESRD.EXT
>
>
,102001,2010/05/11,08:35,2,82.2,0,0,1,2,0
>
> ,102002,2010/06/30,8:00,2,0,1.25e+08,1,1,1,1
>
> ,102002,2010/06/30,8:00,2,0,0,1,1,-3,2
>
> ,102002,2010/06/30,14:03,2,416,0,0,1,2,0
>
> ,102002,2010/06/30,21:00,2,727,0,0,1,2,0
>
> ,102002,2010/07/01,08:21,2,1040,0,0,1,2,0
>
> ,102002,2010/07/01,20:00,2,1070,0,0,1,2,0
>
> ,102002,2010/07/02,08:06,2,719,0,0,1,2,0
>
> ,102002,2010/07/03,08:00,2,580,0,0,1,2,0
>
> ,102002,2010/07/04,08:00,2,518,0,0,1,2,0
>
> ,102002,2010/07/07,08:00,2,127,0,0,1,2,0
>
> ,102002,2010/07/10,08:00,2,35.2,0,0,1,2,0
>
> ,102002,2010/07/14,08:08,2,30,0,0,2,2,0
>
> ,102002,2010/07/17,08:00,2,30,0,0,2,2,0
>
> ,102002,2010/07/21,08:00,2,30,0,0,2,2,0
>
> ,102002,2010/07/23,15:05,2,30,0,0,2,2,0
>
> ,102002,2010/07/28,08:21,2,30,0,0,2,2,0
>
> ,102003,2010/08/06,8:35,3,0,1.25e+08,1,1,1,1
>
> ,102003,2010/08/06,8:35,3,0,0,1,1,-3,2
>
> ,102003,2010/08/06,14:35,3,132,0,0,1,2,0
>
> ,102003,2010/08/06,20:35,3,189,0,0,1,2,0
>
> ,102003,2010/08/07,08:35,3,210,0,0,1,2,0
>
> ,102003,2010/08/07,20:35,3,246,0,0,1,2,0
>
> ,102003,2010/08/08,08:35,3,221,0,0,1,2,0
>
> ,102003,2010/08/09,08:35,3,236,0,0,1,2,0
>
> ,102003,2010/08/10,08:35,3,180,0,0,1,2,0
>
> ,102003,2010/08/13,08:35,3,55.9,0,0,1,2,0
>
> ,102004,2010/08/31,7:40,3,0,1.25e+08,1,1,1,1
>
> ,102004,2010/08/31,7:40,3,0,0,1,1,-3,2
>
> ,102004,2010/08/31,13:52,3,309,0,0,1,2,0
>
> ,102004,2010/08/31,19:40,3,252,0,0,1,2,0
>
> ,102004,2010/09/01,07:40,3,224,0,0,1,2,0
>
> ,102004,2010/09/01,19:43,3,265,0,0,1,2,0
>
> ,102004,2010/09/02,07:40,3,306,0,0,1,2,0
>
> ,102004,2010/09/03,07:40,3,328,0,0,1,2,0
>
> ,102004,2010/09/04,07:40,3,206,0,0,1,2,0
>
> ,102004,2010/09/07,07:40,3,37.6,0,0,1,2,0
>
Dear Katya, Jun, Luann, and Charlie,
Thank you for your advice! The explicit on/off switching is working, although
the results under-estimate the hemodialysis clearance by attributing the
concentration change to sigma.
I'm still wondering what happens when compartment 3 was turned off for my
previous code. My interpretation now is that it sets CMT 3 to zero until it's
turned on again, but does not set the kinetic constants (K23 and K32) to zero.
Therefore, K23 is always there. Is this correct?
Best regards,
Xiao
Quoted reply history
From: Ekaterina Gibiansky [mailto:[email protected]]
Sent: Wednesday, July 20, 2011 12:54 PM
To: [email protected]
Cc: Xiao Hu
Subject: Re: [NMusers] Modeling Hemodialysis clearance
Dear Xiao,
I agree with Jun's advise. You previous setting should not work as when you
switch the compartment 3 off nothing changes for compartment 2, k23 stays the
same as it was.
Regards,
Katya
Ekaterina Gibiansky, Ph.D.
CEO&CSO, QuantPharm LLC
Web: http://www.quantpharm.com
Email: [email protected]<mailto:[email protected]>
Tel: (301)-717-7032
On 7/20/2011 11:20 AM, Jun Shen wrote:
Dear Xiao,
I don't think you need an extra compartment to model the hemodialysis
clearance. I would recommend the following.
$DES
DADT(1)=-K12*A(1)
DADT(2)=K12*A(1)-K20*A(2)-Switch*KHD*A(2)
Where KHD is the hemodialysis elimination rate constant and Switch is an data
item defined in the dataset. In the dataset the Switch value is zero at the
time of start of dialysis, and 1 at the end of dialysis. Also Switch values
should be zero for all events out of dialysis sessions and 1 for all events
within dialysis.
Jun Shen
Senior Pharmacokineticist
Seventh Wave Labs
On Wed, Jul 20, 2011 at 9:26 AM, Xiao Hu
<[email protected]<mailto:[email protected]>> wrote:
Dear Luann,
Thanks for your advice. I realized I did not include relevant data (Excel
change my DATE format automatically; I had to use notepad and selected the
wrong rows). The following the updated data. PK samples were collected one
hour before hemodialysis and one hour after hemodialysis, as well as between
two dialysis. This may address identifiability issue. But if the system does
not turn off Compartment 3, the identifiability will be an issue.
C,ID,DATE,TIME,GROUP,CONC,AMT,MDV,TYPE,CMT,EVID
,102006,2010/11/11,14:35,5,0,1.25e+08,1,1,1,1
,102006,2010/11/11,14:35,5,0,0,1,1,-3,2
,102006,2010/11/11,20:35,5,44.7,0,0,1,2,0
,102006,2010/11/12,02:35,5,71.9,0,0,1,2,0
,102006,2010/11/12,14:43,5,69.8,0,0,1,2,0
,102006,2010/11/13,02:35,5,122,0,0,1,2,0
,102006,2010/11/13,14:35,5,131,0,0,1,2,0
,102006,2010/11/14,08:55,5,132,0,0,1,2,0
,102006,2010/11/14,09:00,5,0,0,1,1,3,2
,102006,2010/11/14,13:40,5,0,0,1,1,-3,2
,102006,2010/11/14,14:35,5,89.8,0,0,1,2,0
,102006,2010/11/15,10:29,5,68.7,0,0,1,2,0
,102006,2010/11/16,17:30,5,0,0,1,1,3,2
,102006,2010/11/16,21:30,5,0,0,1,1,-3,2
,102006,2010/11/18,17:40,5,0,0,1,1,3,2
,102006,2010/11/18,23:40,5,0,0,1,1,-3,2
,102006,2010/11/19,00:43,5,30,0,0,2,2,0
,102006,2010/11/21,16:20,5,30,0,0,2,2,0
,102006,2010/11/21,17:25,5,0,0,1,1,3,2
,102006,2010/11/21,23:25,5,0,0,1,1,-3,2
,102006,2010/11/23,17:40,5,0,0,1,1,3,2
,102006,2010/11/23,23:41,5,0,0,1,1,-3,2
,102006,2010/11/25,06:00,5,0,0,1,1,3,2
,102006,2010/11/25,10:00,5,0,0,1,1,-3,2
,102006,2010/11/28,12:30,5,0,0,1,1,3,2
,102006,2010/11/28,17:02,5,0,0,1,1,-3,2
,102006,2010/11/30,19:00,5,0,0,1,1,3,2
,102006,2010/11/30,23:55,5,0,0,1,1,-3,2
,102006,2010/12/02,17:55,5,0,0,1,1,3,2
,102006,2010/12/02,23:55,5,0,0,1,1,-3,2
,102006,2010/12/05,17:25,5,0,0,1,1,3,2
,102006,2010/12/05,20:35,5,0,0,1,1,-3,2
,102006,2010/12/07,18:40,5,0,0,1,1,3,2
,102006,2010/12/07,23:57,5,0,0,1,1,-3,2
,102006,2010/12/09,17:55,5,0,0,1,1,3,2
,102006,2010/12/09,23:55,5,0,0,1,1,-3,2
,102006,2010/12/16,17:48,5,0,0,1,1,3,2
,102006,2010/12/16,23:48,5,0,0,1,1,-3,2
,102007,2010/11/13,14:17,5,0,1.25e+08,1,1,1,1
,102007,2010/11/13,14:17,5,0,0,1,1,-3,2
,102007,2010/11/13,20:17,5,394,0,0,1,2,0
,102007,2010/11/14,02:17,5,298,0,0,1,2,0
,102007,2010/11/14,14:17,5,532,0,0,1,2,0
,102007,2010/11/15,10:22,5,615,0,0,1,2,0
,102007,2010/11/15,14:25,5,686,0,0,1,2,0
,102007,2010/11/16,07:42,5,740,0,0,1,2,0
,102007,2010/11/16,07:43,5,0,0,1,1,3,2
,102007,2010/11/16,11:48,5,0,0,1,1,-3,2
,102007,2010/11/16,14:17,5,703,0,0,1,2,0
,102007,2010/11/17,14:20,5,530,0,0,1,2,0
,102007,2010/11/18,10:46,5,0,0,1,1,3,2
,102007,2010/11/18,14:51,5,0,0,1,1,-3,2
,102007,2010/11/20,10:15,5,165,0,0,1,2,0
,102007,2010/11/20,11:22,5,0,0,1,1,3,2
,102007,2010/11/20,15:24,5,0,0,1,1,-3,2
,102007,2010/11/20,16:00,5,157,0,0,1,2,0
,102007,2010/11/23,09:53,5,44.7,0,0,1,2,0
,102007,2010/11/23,10:46,5,0,0,1,1,3,2
,102007,2010/11/23,14:52,5,0,0,1,1,-3,2
,102007,2010/11/25,10:33,5,0,0,1,1,3,2
,102007,2010/11/25,14:48,5,0,0,1,1,-3,2
,102007,2010/11/27,11:09,5,0,0,1,1,3,2
,102007,2010/11/27,15:01,5,0,0,1,1,-3,2
,102007,2010/11/30,10:59,5,30,0,0,2,2,0
,102007,2010/11/30,12:27,5,0,0,1,1,3,2
,102007,2010/11/30,15:33,5,0,0,1,1,-3,2
,102007,2010/12/02,12:11,5,0,0,1,1,3,2
,102007,2010/12/02,16:17,5,0,0,1,1,-3,2
,102007,2010/12/04,11:20,5,30,0,0,2,2,0
,102007,2010/12/04,12:18,5,0,0,1,1,3,2
,102007,2010/12/04,15:59,5,0,0,1,1,-3,2
,102007,2010/12/07,10:20,5,30,0,0,2,2,0
,102007,2010/12/07,11:58,5,0,0,1,1,3,2
,102007,2010/12/07,16:06,5,0,0,1,1,-3,2
,102007,2010/12/09,11:02,5,0,0,1,1,3,2
,102007,2010/12/09,14:33,5,0,0,1,1,-3,2
,102007,2010/12/12,11:44,5,30,0,0,2,2,0
,102007,2010/12/14,10:58,5,0,0,1,1,3,2
,102007,2010/12/14,15:00,5,0,0,1,1,-3,2
,102007,2010/12/16,11:18,5,0,0,1,1,3,2
,102007,2010/12/16,14:50,5,0,0,1,1,-3,2
,102007,2010/12/18,10:56,5,0,0,1,1,3,2
,102007,2010/12/18,14:56,5,0,0,1,1,-3,2
,104006,2010/11/12,12:30,5,0,1.25e+08,1,1,1,1
,104006,2010/11/12,12:30,5,0,0,1,1,-3,2
,104006,2010/11/12,18:30,5,100,0,0,1,2,0
,104006,2010/11/13,00:30,5,177,0,0,1,2,0
,104006,2010/11/13,12:30,5,350,0,0,1,2,0
,104006,2010/11/13,18:30,5,415,0,0,1,2,0
,104006,2010/11/15,12:30,5,362,0,0,1,2,0
,104006,2010/11/15,12:45,5,0,0,1,1,3,2
,104006,2010/11/15,16:45,5,0,0,1,1,-3,2
,104006,2010/11/15,17:45,5,253,0,0,1,2,0
,104006,2010/11/16,12:30,5,164,0,0,1,2,0
,104006,2010/11/17,07:40,5,0,0,1,1,3,2
,104006,2010/11/17,11:44,5,0,0,1,1,-3,2
,104006,2010/11/17,13:40,5,88.7,0,0,1,2,0
,104006,2010/11/19,06:05,5,47.7,0,0,1,2,0
,104006,2010/11/19,07:41,5,0,0,1,1,3,2
,104006,2010/11/19,11:45,5,0,0,1,1,-3,2
,104006,2010/11/19,13:06,5,31.7,0,0,1,2,0
,104007,2010/11/13,12:40,5,0,1.25e+08,1,1,1,1
,104007,2010/11/13,12:40,5,0,0,1,1,-3,2
,104007,2010/11/13,18:40,5,173,0,0,1,2,0
,104007,2010/11/14,00:40,5,234,0,0,1,2,0
,104007,2010/11/14,12:45,5,254,0,0,1,2,0
,104007,2010/11/14,18:47,5,276,0,0,1,2,0
,104007,2010/11/15,12:40,5,276,0,0,1,2,0
,104007,2010/11/16,12:40,5,332,0,0,1,2,0
,104007,2010/11/16,12:55,5,0,0,1,1,3,2
,104007,2010/11/16,16:55,5,0,0,1,1,-3,2
,104007,2010/11/16,17:58,5,275,0,0,1,2,0
,104007,2010/11/18,06:47,5,228,0,0,1,2,0
,104007,2010/11/18,07:52,5,0,0,1,1,3,2
,104007,2010/11/18,11:58,5,0,0,1,1,-3,2
,104007,2010/11/18,13:06,5,158,0,0,1,2,0
,104007,2010/11/20,06:10,5,76.3,0,0,1,2,0
,104007,2010/11/20,07:10,5,0,0,1,1,3,2
,104007,2010/11/20,11:13,5,0,0,1,1,-3,2
,104007,2010/11/20,11:59,5,67.1,0,0,1,2,0
,104010,2011/04/29,12:42,5,0,1.25e+08,1,1,1,1
,104010,2011/04/29,12:42,5,0,0,1,1,-3,2
,104010,2011/04/29,18:50,5,119,0,0,1,2,0
,104010,2011/04/30,00:42,5,203,0,0,1,2,0
,104010,2011/04/30,12:42,5,197,0,0,1,2,0
,104010,2011/04/30,18:42,5,295,0,0,1,2,0
,104010,2011/05/01,12:42,5,224,0,0,1,2,0
,104010,2011/05/02,12:44,5,268,0,0,1,2,0
,104010,2011/05/02,17:57,5,216,0,0,1,2,0
,104010,2011/05/04,05:40,5,161,0,0,1,2,0
,104010,2011/05/04,12:40,5,110,0,0,1,2,0
,104010,2011/05/06,03:00,5,66.7,0,0,1,2,0
,104010,2011/05/06,11:36,5,44.5,0,0,1,2,0
,106009,2011/01/28,14:15,5,0,1.25e+08,1,1,1,1
,106009,2011/01/28,14:15,5,0,0,1,1,-3,2
,106009,2011/01/28,20:15,5,52.7,0,0,1,2,0
,106009,2011/01/29,02:15,5,74.6,0,0,1,2,0
,106009,2011/01/29,14:15,5,85.2,0,0,1,2,0
,106009,2011/01/30,02:15,5,94.6,0,0,1,2,0
,106009,2011/01/30,14:15,5,102,0,0,1,2,0
,106009,2011/01/31,12:48,5,138,0,0,1,2,0
,106009,2011/01/31,13:05,5,0,0,1,1,3,2
,106009,2011/01/31,17:05,5,0,0,1,1,-3,2
,106009,2011/01/31,18:12,5,105,0,0,1,2,0
,106009,2011/02/02,14:07,5,118,0,0,1,2,0
,106009,2011/02/02,16:50,5,0,0,1,1,3,2
,106009,2011/02/02,20:50,5,0,0,1,1,-3,2
,106009,2011/02/02,22:01,5,95.1,0,0,1,2,0
,106009,2011/02/04,13:34,5,72.9,0,0,1,2,0
,106009,2011/02/04,15:54,5,0,0,1,1,3,2
,106009,2011/02/04,20:06,5,0,0,1,1,-3,2
,106009,2011/02/04,21:18,5,60.3,0,0,1,2,0
,106009,2011/02/07,00:50,5,0,0,1,1,-3,2
,106009,2011/02/07,11:02,5,39.4,0,0,1,2,0
,106009,2011/02/07,17:20,5,0,0,1,1,3,2
,106009,2011/02/09,01:05,5,0,0,1,1,-3,2
,106009,2011/02/09,17:05,5,0,0,1,1,3,2
,106009,2011/02/11,01:23,5,0,0,1,1,-3,2
,106009,2011/02/11,08:49,5,30,0,0,2,2,0
,106009,2011/02/11,17:15,5,0,0,1,1,3,2
,106009,2011/02/14,01:17,5,0,0,1,1,-3,2
,106009,2011/02/14,08:44,5,30,0,0,2,2,0
,106009,2011/02/14,17:17,5,0,0,1,1,3,2
,106009,2011/02/16,01:20,5,0,0,1,1,-3,2
,106009,2011/02/16,17:20,5,0,0,1,1,3,2
,106009,2011/02/18,01:08,5,0,0,1,1,-3,2
,106009,2011/02/18,17:02,5,0,0,1,1,3,2
,106009,2011/02/21,01:04,5,0,0,1,1,-3,2
,106009,2011/02/21,17:04,5,0,0,1,1,3,2
,106009,2011/02/23,17:39,5,0,0,1,1,3,2
,106009,2011/02/23,21:45,5,0,0,1,1,-3,2
,106009,2011/02/25,16:55,5,0,0,1,1,3,2
,106009,2011/02/25,20:56,5,0,0,1,1,-3,2
,106009,2011/02/28,01:06,5,0,0,1,1,-3,2
,106009,2011/02/28,17:21,5,0,0,1,1,3,2
,106009,2011/03/02,01:01,5,0,0,1,1,-3,2
,106009,2011/03/02,17:05,5,0,0,1,1,3,2
-----Original Message-----
From: Luann Phillips
[mailto:[email protected]<mailto:[email protected]>]
Sent: Wednesday, July 20, 2011 9:45 AM
To: Xiao Hu
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [NMusers] Modeling Hemodialysis clearance
Xiao Hu,
I think it may be a problem with identifiability. It can't separate the
definition of K23 from K20 unless there are measurements during elimination for
hemo. patients off dialysis and on dialysis.
Thoughts:
(1) Try making K20=0 for hemodialysis patients
Assumes: no elimination except during hemodialysis via K23
(2) Estimate a different theta for K20 in hemodialysis patients since it should
be different for them (bi-modal distribution)
Assumes: very small elimination from central & with additive elimination from
hemodialysis via K23.
Regards,
Luann Phillips
Director, PK/PD
Cognigen Corporation
Xiao Hu wrote:
> Dear NM users,
>
>
>
> I'm working on a PK model in renal disease patients with hemodialysis.
> The drug in healthy subjects is well described with a first-order
> absorption and one-compartment disposition model. A third
> hemodialysis compartment was added; CMT=3 or -3 were included in the
> data set to turn this compartment on and off. However, the 3rd
> compartment did not seem to be turned off, based on the fact that the
> same results were obtained whether I excluded the EVID==2 record or
> not (corresponding to CMT==3 or -3). Both ADVAN6 and ADVAN7 provided
> the same results as well. The code and partial data set are shown
> below. I'm wondering if you can point me to the right direction. I'd really
> appreciate your input. Thanks!
>
>
>
> Best regards,
>
> Xiao
>
>
>
> $INPUT C ID DAT2=DROP TIME GROUP DV AMT MDV TYPE CMT EVID
>
>
>
> $DATA .\DATA\FINAL\105RI101ESRDPK.CSV
>
> IGNORE=C IGN(GROUP.NE.5) ;IGN(EVID.EQ.2)
>
>
>
> $SUBROUTINES ADVAN7 ;ADVAN6 TOL=8
>
>
>
> $MODEL
>
> COMP=(DEPOT,INITIALOFF,DEFDOSE)
>
> COMP=(CENTRAL,DEFOBS,NOOFF)
>
> COMP=(HEMODIA,INITIALOFF)
>
>
>
> $PK
>
> K12=THETA(1)
>
> K20=THETA(2)
>
> K23=THETA(3)
>
> K32=0
>
> V2=THETA(4)*EXP(ETA(1))
>
> S2=V2
>
> $ERROR
>
> Y=F*EXP(EPS(1))
>
> IPRE=F
>
>
>
> ;$DES
>
> ;DADT(1)=-K12*A(1)
>
> ;DADT(2)=K12*A(1)-K23*A(2)-K20*A(2)
>
> ;DADT(3)=K23*A(2)
>
>
>
> $THETA
>
> (0,0.1) ;THETA1 K12
>
> (0,0.05) ;THETA2 K20
>
> (0,.102) ;THETA3 K23
>
> (0,200000) ;THETA6 V2
>
>
>
> $OMEGA
>
> 0.2
>
> $SIGMA
>
> 0.2
>
>
>
> $ESTIMATION MAXEVAL=9999 METH=COND PRINT=5 MSFO=ESRD.MSF
> FILE=ESRD.EXT
>
> ,102001,2010/05/11,08:35,2,82.2,0,0,1,2,0
>
> ,102002,2010/06/30,8:00,2,0,1.25e+08,1,1,1,1
>
> ,102002,2010/06/30,8:00,2,0,0,1,1,-3,2
>
> ,102002,2010/06/30,14:03,2,416,0,0,1,2,0
>
> ,102002,2010/06/30,21:00,2,727,0,0,1,2,0
>
> ,102002,2010/07/01,08:21,2,1040,0,0,1,2,0
>
> ,102002,2010/07/01,20:00,2,1070,0,0,1,2,0
>
> ,102002,2010/07/02,08:06,2,719,0,0,1,2,0
>
> ,102002,2010/07/03,08:00,2,580,0,0,1,2,0
>
> ,102002,2010/07/04,08:00,2,518,0,0,1,2,0
>
> ,102002,2010/07/07,08:00,2,127,0,0,1,2,0
>
> ,102002,2010/07/10,08:00,2,35.2,0,0,1,2,0
>
> ,102002,2010/07/14,08:08,2,30,0,0,2,2,0
>
> ,102002,2010/07/17,08:00,2,30,0,0,2,2,0
>
> ,102002,2010/07/21,08:00,2,30,0,0,2,2,0
>
> ,102002,2010/07/23,15:05,2,30,0,0,2,2,0
>
> ,102002,2010/07/28,08:21,2,30,0,0,2,2,0
>
> ,102003,2010/08/06,8:35,3,0,1.25e+08,1,1,1,1
>
> ,102003,2010/08/06,8:35,3,0,0,1,1,-3,2
>
> ,102003,2010/08/06,14:35,3,132,0,0,1,2,0
>
> ,102003,2010/08/06,20:35,3,189,0,0,1,2,0
>
> ,102003,2010/08/07,08:35,3,210,0,0,1,2,0
>
> ,102003,2010/08/07,20:35,3,246,0,0,1,2,0
>
> ,102003,2010/08/08,08:35,3,221,0,0,1,2,0
>
> ,102003,2010/08/09,08:35,3,236,0,0,1,2,0
>
> ,102003,2010/08/10,08:35,3,180,0,0,1,2,0
>
> ,102003,2010/08/13,08:35,3,55.9,0,0,1,2,0
>
> ,102004,2010/08/31,7:40,3,0,1.25e+08,1,1,1,1
>
> ,102004,2010/08/31,7:40,3,0,0,1,1,-3,2
>
> ,102004,2010/08/31,13:52,3,309,0,0,1,2,0
>
> ,102004,2010/08/31,19:40,3,252,0,0,1,2,0
>
> ,102004,2010/09/01,07:40,3,224,0,0,1,2,0
>
> ,102004,2010/09/01,19:43,3,265,0,0,1,2,0
>
> ,102004,2010/09/02,07:40,3,306,0,0,1,2,0
>
> ,102004,2010/09/03,07:40,3,328,0,0,1,2,0
>
> ,102004,2010/09/04,07:40,3,206,0,0,1,2,0
>
> ,102004,2010/09/07,07:40,3,37.6,0,0,1,2,0
>
Xiao Hu,
The concept of turning on/off compartments was presented to me in the context of modeling urine and plasma data. To model urine data correctly, when the cmt is shut off the rate going to the urine cmt would also have to be shut off. So in your case, I believe the K23 portion of the equation would be shut off.
I would be very surprised if this feature is not working correctly because I would think there would have been a bug report previously. However after further examining your code yesterday, I don't see anything that would prevent NM from turning the cmt on and off
(A) So I'm curious. When you use the on/off method what estimate for K23 are you getting?
If it is very small, you wouldn't see the impact of the cmt turning and off because the amount going into the 3rd cmt will be negligible. If this is happening, most likely NM can not distinguish K20 and K23 based upon the data that you have provided.
If K20 theoretically should be small for a hemodialysis subject, I would temporarily fix K20 to 0 for those patients and run the model again. Doing this, I think you will see that the cmt is turning on and off. If this works and the assumption of K20=0 is really bothersome, then I would try estimating a different K20 for the hemodialysis patients. See code below.
Setting K20=0 Example
HFLG=0 ;non-hemodialysis subject
IF(GRP.EQ.#) HFLG=1 ;hemodialysis subject
K20= (1-HFLG)*THETA(2)
Separate estimates
HFLG=0 ;non-hemodialysis subject
IF(GRP.EQ.#) HFLG=1 ;hemodialysis subject
K20= (1-HFLG)*THETA(2) + HFLG*THETA(5)
(B) In the case of using flag variables to change 'K23' to 0,remember to consider how NM steps between observed time points and what values of the 'user defined' data items it is using when setting your flag variable.
This information is obtained from $BIND in help since it also describes the default behaviors. In your case, think of the t described as an additional dose or lagged dose as any time t between 2 event records.
$BIND help
Let t be a time at which an additional or lagged dose enters the sys-
tem. If t1 is the greatest event time not exceeding the time t, then
the "last event record" is the last event record with event time t1,
and the "next event record" is the event record following the last
event record. The event time on the next event record will exceed
time t.
....
For user (concomitant) data items, the default is NEXT but any of
DOSE, NEXT, LAST may be specified.
Take away:
TIME=t1 "last event record" FLG=1
T=t times not included in the data between t1 and t2
TIME=t2 "next event record" FLG=0
Your flag would be a user(concomitant) data item, so the default is to use values from the NEXT event record for times between t1 and t2. Therefore, for times between t1 and t2 the FLG value would be 0.
Regards,
Luann Phillips
Director PK/PD
Cognigen Corporation
Xiao Hu wrote:
> Dear NM users,
>
> I’m working on a PK model in renal disease patients with hemodialysis. The drug in healthy subjects is well described with a first-order absorption and one-compartment disposition model. A third hemodialysis compartment was added; CMT=3 or -3 were included in the data set to turn this compartment on and off. However, the 3rd compartment did not seem to be turned off, based on the fact that the same results were obtained whether I excluded the EVID==2 record or not (corresponding to CMT==3 or -3). Both ADVAN6 and ADVAN7 provided the same results as well. The code and partial data set are shown below. I’m wondering if you can point me to the right direction. I’d really appreciate your input. Thanks!
>
> Best regards,
>
> Xiao
>
> $INPUT C ID DAT2=DROP TIME GROUP DV AMT MDV TYPE CMT EVID
>
> $DATA .\DATA\FINAL\105RI101ESRDPK.CSV
>
> IGNORE=C IGN(GROUP.NE.5) ;IGN(EVID.EQ.2)
>
> $SUBROUTINES ADVAN7 ;ADVAN6 TOL=8
>
> $MODEL
>
> COMP=(DEPOT,INITIALOFF,DEFDOSE)
>
> COMP=(CENTRAL,DEFOBS,NOOFF)
>
> COMP=(HEMODIA,INITIALOFF)
>
> $PK
>
> K12=THETA(1)
>
> K20=THETA(2)
>
> K23=THETA(3)
>
> K32=0
>
> V2=THETA(4)*EXP(ETA(1))
>
> S2=V2
>
> $ERROR
>
> Y=F*EXP(EPS(1))
>
> IPRE=F
>
> ;$DES
>
> ;DADT(1)=-K12*A(1)
>
> ;DADT(2)=K12*A(1)-K23*A(2)-K20*A(2)
>
> ;DADT(3)=K23*A(2)
>
> $THETA
>
> (0,0.1) ;THETA1 K12
>
> (0,0.05) ;THETA2 K20
>
> (0,.102) ;THETA3 K23
>
> (0,200000) ;THETA6 V2
>
> $OMEGA
>
> 0.2
>
> $SIGMA
>
> 0.2
>
> $ESTIMATION MAXEVAL=9999 METH=COND PRINT=5 MSFO=ESRD.MSF FILE=ESRD.EXT
>
> C,ID,DATE,TIME,GROUP,CONC,AMT,MDV,TYPE,CMT,EVID
>
> ,102001,2010/05/04,8:35,2,0,6.3e+07,1,1,1,1
>
> ,102001,2010/05/04,8:35,2,0,0,1,1,-3,2
>
> ,102001,2010/05/04,14:39,2,177,0,0,1,2,0
>
> ,102001,2010/05/04,20:35,2,190,0,0,1,2,0
>
> ,102001,2010/05/05,08:35,2,144,0,0,1,2,0
>
> ,102001,2010/05/05,20:35,2,145,0,0,1,2,0
>
> ,102001,2010/05/06,08:37,2,135,0,0,1,2,0
>
> ,102001,2010/05/07,08:41,2,139,0,0,1,2,0
>
> ,102001,2010/05/08,08:35,2,177,0,0,1,2,0
>
> ,102001,2010/05/11,08:35,2,82.2,0,0,1,2,0
>
> ,102002,2010/06/30,8:00,2,0,1.25e+08,1,1,1,1
>
> ,102002,2010/06/30,8:00,2,0,0,1,1,-3,2
>
> ,102002,2010/06/30,14:03,2,416,0,0,1,2,0
>
> ,102002,2010/06/30,21:00,2,727,0,0,1,2,0
>
> ,102002,2010/07/01,08:21,2,1040,0,0,1,2,0
>
> ,102002,2010/07/01,20:00,2,1070,0,0,1,2,0
>
> ,102002,2010/07/02,08:06,2,719,0,0,1,2,0
>
> ,102002,2010/07/03,08:00,2,580,0,0,1,2,0
>
> ,102002,2010/07/04,08:00,2,518,0,0,1,2,0
>
> ,102002,2010/07/07,08:00,2,127,0,0,1,2,0
>
> ,102002,2010/07/10,08:00,2,35.2,0,0,1,2,0
>
> ,102002,2010/07/14,08:08,2,30,0,0,2,2,0
>
> ,102002,2010/07/17,08:00,2,30,0,0,2,2,0
>
> ,102002,2010/07/21,08:00,2,30,0,0,2,2,0
>
> ,102002,2010/07/23,15:05,2,30,0,0,2,2,0
>
> ,102002,2010/07/28,08:21,2,30,0,0,2,2,0
>
> ,102003,2010/08/06,8:35,3,0,1.25e+08,1,1,1,1
>
> ,102003,2010/08/06,8:35,3,0,0,1,1,-3,2
>
> ,102003,2010/08/06,14:35,3,132,0,0,1,2,0
>
> ,102003,2010/08/06,20:35,3,189,0,0,1,2,0
>
> ,102003,2010/08/07,08:35,3,210,0,0,1,2,0
>
> ,102003,2010/08/07,20:35,3,246,0,0,1,2,0
>
> ,102003,2010/08/08,08:35,3,221,0,0,1,2,0
>
> ,102003,2010/08/09,08:35,3,236,0,0,1,2,0
>
> ,102003,2010/08/10,08:35,3,180,0,0,1,2,0
>
> ,102003,2010/08/13,08:35,3,55.9,0,0,1,2,0
>
> ,102004,2010/08/31,7:40,3,0,1.25e+08,1,1,1,1
>
> ,102004,2010/08/31,7:40,3,0,0,1,1,-3,2
>
> ,102004,2010/08/31,13:52,3,309,0,0,1,2,0
>
> ,102004,2010/08/31,19:40,3,252,0,0,1,2,0
>
> ,102004,2010/09/01,07:40,3,224,0,0,1,2,0
>
> ,102004,2010/09/01,19:43,3,265,0,0,1,2,0
>
> ,102004,2010/09/02,07:40,3,306,0,0,1,2,0
>
> ,102004,2010/09/03,07:40,3,328,0,0,1,2,0
>
> ,102004,2010/09/04,07:40,3,206,0,0,1,2,0
>
> ,102004,2010/09/07,07:40,3,37.6,0,0,1,2,0
Xiao,
When you turn a compartment off, amount in the compartment becomes
zero, and is not changing while it is off. Whatever was coming to
this compartment from another compartment(s) still leaves this other
compartment and the system as a whole (so mass balance is not
preserved). Nothing comes back from this compartment (even if
kinetic model has distribution back from it) since nothing is there.
The system behaves as if for the time when compartment 3 is off, you
have the equation A(3)=0 instead of DADT(3)=K23*A(2).
Regards,
Katya
Ekaterina Gibiansky, Ph.D.
CEO&CSO, QuantPharm LLC
Web: www.quantpharm.com
Email: EGibiansky at quantpharm.com
Tel: (301)-717-7032
On 7/21/2011 7:39 AM, Xiao Hu wrote:
Dear Katya, Jun, Luann, and Charlie,
Thank you for your advice! The explicit on/off
switching is working, although the results under-estimate
the hemodialysis clearance by attributing the concentration
change to sigma.
I’m still wondering what happens when compartment
3 was turned off for my previous code. My interpretation
now is that it sets CMT 3 to zero until it’s turned on
again, but does not set the kinetic constants (K23 and K32)
to zero. Therefore, K23 is always there. Is this correct?
Best regards,
Xiao
Quoted reply history
From: Ekaterina Gibiansky
[ mailto: [email protected] ]
Sent: Wednesday, July 20, 2011 12:54 PM
To: [email protected]
Cc: Xiao Hu
Subject: Re: [NMusers] Modeling Hemodialysis
clearance
Dear Xiao,
I agree with Jun's advise. You previous setting should not
work as when you switch the compartment 3 off nothing changes
for compartment 2, k23 stays the same as it was.
Regards,
Katya
Ekaterina Gibiansky, Ph.D.
CEO&CSO, QuantPharm LLC
Web: www.quantpharm.com
Email: [email protected]
Tel: (301)-717-7032
On 7/20/2011 11:20 AM, Jun Shen wrote:
Dear Xiao,
I don't think you need an extra compartment to model the
hemodialysis clearance. I would recommend the following.
$DES
DADT(1)=-K12*A(1)
DADT(2)=K12*A(1)-K20*A(2)-Switch*KHD*A(2)
Where KHD is the hemodialysis elimination rate constant and
Switch is an data item defined in the dataset. In the
dataset the Switch value is zero at the time of start of
dialysis, and 1 at the end of dialysis. Also Switch values
should be zero for all events out of dialysis sessions and 1
for all events within dialysis.
Jun Shen
Senior Pharmacokineticist
Seventh Wave Labs
On Wed, Jul 20, 2011 at 9:26 AM, Xiao Hu
< [email protected] >
wrote:
Dear Luann,
Thanks for your advice. I realized I did not include
relevant data (Excel change my DATE format automatically; I
had to use notepad and selected the wrong rows). The
following the updated data. PK samples were collected one
hour before hemodialysis and one hour after hemodialysis, as
well as between two dialysis. This may address
identifiability issue. But if the system does not turn off
Compartment 3, the identifiability will be an issue.
C,ID,DATE,TIME,GROUP,CONC,AMT,MDV,TYPE,CMT,EVID
,102006,2010/11/11,14:35,5,0,1.25e+08,1,1,1,1
,102006,2010/11/11,14:35,5,0,0,1,1,-3,2
,102006,2010/11/11,20:35,5,44.7,0,0,1,2,0
,102006,2010/11/12,02:35,5,71.9,0,0,1,2,0
,102006,2010/11/12,14:43,5,69.8,0,0,1,2,0
,102006,2010/11/13,02:35,5,122,0,0,1,2,0
,102006,2010/11/13,14:35,5,131,0,0,1,2,0
,102006,2010/11/14,08:55,5,132,0,0,1,2,0
,102006,2010/11/14,09:00,5,0,0,1,1,3,2
,102006,2010/11/14,13:40,5,0,0,1,1,-3,2
,102006,2010/11/14,14:35,5,89.8,0,0,1,2,0
,102006,2010/11/15,10:29,5,68.7,0,0,1,2,0
,102006,2010/11/16,17:30,5,0,0,1,1,3,2
,102006,2010/11/16,21:30,5,0,0,1,1,-3,2
,102006,2010/11/18,17:40,5,0,0,1,1,3,2
,102006,2010/11/18,23:40,5,0,0,1,1,-3,2
,102006,2010/11/19,00:43,5,30,0,0,2,2,0
,102006,2010/11/21,16:20,5,30,0,0,2,2,0
,102006,2010/11/21,17:25,5,0,0,1,1,3,2
,102006,2010/11/21,23:25,5,0,0,1,1,-3,2
,102006,2010/11/23,17:40,5,0,0,1,1,3,2
,102006,2010/11/23,23:41,5,0,0,1,1,-3,2
,102006,2010/11/25,06:00,5,0,0,1,1,3,2
,102006,2010/11/25,10:00,5,0,0,1,1,-3,2
,102006,2010/11/28,12:30,5,0,0,1,1,3,2
,102006,2010/11/28,17:02,5,0,0,1,1,-3,2
,102006,2010/11/30,19:00,5,0,0,1,1,3,2
,102006,2010/11/30,23:55,5,0,0,1,1,-3,2
,102006,2010/12/02,17:55,5,0,0,1,1,3,2
,102006,2010/12/02,23:55,5,0,0,1,1,-3,2
,102006,2010/12/05,17:25,5,0,0,1,1,3,2
,102006,2010/12/05,20:35,5,0,0,1,1,-3,2
,102006,2010/12/07,18:40,5,0,0,1,1,3,2
,102006,2010/12/07,23:57,5,0,0,1,1,-3,2
,102006,2010/12/09,17:55,5,0,0,1,1,3,2
,102006,2010/12/09,23:55,5,0,0,1,1,-3,2
,102006,2010/12/16,17:48,5,0,0,1,1,3,2
,102006,2010/12/16,23:48,5,0,0,1,1,-3,2
,102007,2010/11/13,14:17,5,0,1.25e+08,1,1,1,1
,102007,2010/11/13,14:17,5,0,0,1,1,-3,2
,102007,2010/11/13,20:17,5,394,0,0,1,2,0
,102007,2010/11/14,02:17,5,298,0,0,1,2,0
,102007,2010/11/14,14:17,5,532,0,0,1,2,0
,102007,2010/11/15,10:22,5,615,0,0,1,2,0
,102007,2010/11/15,14:25,5,686,0,0,1,2,0
,102007,2010/11/16,07:42,5,740,0,0,1,2,0
,102007,2010/11/16,07:43,5,0,0,1,1,3,2
,102007,2010/11/16,11:48,5,0,0,1,1,-3,2
,102007,2010/11/16,14:17,5,703,0,0,1,2,0
,102007,2010/11/17,14:20,5,530,0,0,1,2,0
,102007,2010/11/18,10:46,5,0,0,1,1,3,2
,102007,2010/11/18,14:51,5,0,0,1,1,-3,2
,102007,2010/11/20,10:15,5,165,0,0,1,2,0
,102007,2010/11/20,11:22,5,0,0,1,1,3,2
,102007,2010/11/20,15:24,5,0,0,1,1,-3,2
,102007,2010/11/20,16:00,5,157,0,0,1,2,0
,102007,2010/11/23,09:53,5,44.7,0,0,1,2,0
,102007,2010/11/23,10:46,5,0,0,1,1,3,2
,102007,2010/11/23,14:52,5,0,0,1,1,-3,2
,102007,2010/11/25,10:33,5,0,0,1,1,3,2
,102007,2010/11/25,14:48,5,0,0,1,1,-3,2
,102007,2010/11/27,11:09,5,0,0,1,1,3,2
,102007,2010/11/27,15:01,5,0,0,1,1,-3,2
,102007,2010/11/30,10:59,5,30,0,0,2,2,0
,102007,2010/11/30,12:27,5,0,0,1,1,3,2
,102007,2010/11/30,15:33,5,0,0,1,1,-3,2
,102007,2010/12/02,12:11,5,0,0,1,1,3,2
,102007,2010/12/02,16:17,5,0,0,1,1,-3,2
,102007,2010/12/04,11:20,5,30,0,0,2,2,0
,102007,2010/12/04,12:18,5,0,0,1,1,3,2
,102007,2010/12/04,15:59,5,0,0,1,1,-3,2
,102007,2010/12/07,10:20,5,30,0,0,2,2,0
,102007,2010/12/07,11:58,5,0,0,1,1,3,2
,102007,2010/12/07,16:06,5,0,0,1,1,-3,2
,102007,2010/12/09,11:02,5,0,0,1,1,3,2
,102007,2010/12/09,14:33,5,0,0,1,1,-3,2
,102007,2010/12/12,11:44,5,30,0,0,2,2,0
,102007,2010/12/14,10:58,5,0,0,1,1,3,2
,102007,2010/12/14,15:00,5,0,0,1,1,-3,2
,102007,2010/12/16,11:18,5,0,0,1,1,3,2
,102007,2010/12/16,14:50,5,0,0,1,1,-3,2
,102007,2010/12/18,10:56,5,0,0,1,1,3,2
,102007,2010/12/18,14:56,5,0,0,1,1,-3,2
,104006,2010/11/12,12:30,5,0,1.25e+08,1,1,1,1
,104006,2010/11/12,12:30,5,0,0,1,1,-3,2
,104006,2010/11/12,18:30,5,100,0,0,1,2,0
,104006,2010/11/13,00:30,5,177,0,0,1,2,0
,104006,2010/11/13,12:30,5,350,0,0,1,2,0
,104006,2010/11/13,18:30,5,415,0,0,1,2,0
,104006,2010/11/15,12:30,5,362,0,0,1,2,0
,104006,2010/11/15,12:45,5,0,0,1,1,3,2
,104006,2010/11/15,16:45,5,0,0,1,1,-3,2
,104006,2010/11/15,17:45,5,253,0,0,1,2,0
,104006,2010/11/16,12:30,5,164,0,0,1,2,0
,104006,2010/11/17,07:40,5,0,0,1,1,3,2
,104006,2010/11/17,11:44,5,0,0,1,1,-3,2
,104006,2010/11/17,13:40,5,88.7,0,0,1,2,0
,104006,2010/11/19,06:05,5,47.7,0,0,1,2,0
,104006,2010/11/19,07:41,5,0,0,1,1,3,2
,104006,2010/11/19,11:45,5,0,0,1,1,-3,2
,104006,2010/11/19,13:06,5,31.7,0,0,1,2,0
,104007,2010/11/13,12:40,5,0,1.25e+08,1,1,1,1
,104007,2010/11/13,12:40,5,0,0,1,1,-3,2
,104007,2010/11/13,18:40,5,173,0,0,1,2,0
,104007,2010/11/14,00:40,5,234,0,0,1,2,0
,104007,2010/11/14,12:45,5,254,0,0,1,2,0
,104007,2010/11/14,18:47,5,276,0,0,1,2,0
,104007,2010/11/15,12:40,5,276,0,0,1,2,0
,104007,2010/11/16,12:40,5,332,0,0,1,2,0
,104007,2010/11/16,12:55,5,0,0,1,1,3,2
,104007,2010/11/16,16:55,5,0,0,1,1,-3,2
,104007,2010/11/16,17:58,5,275,0,0,1,2,0
,104007,2010/11/18,06:47,5,228,0,0,1,2,0
,104007,2010/11/18,07:52,5,0,0,1,1,3,2
,104007,2010/11/18,11:58,5,0,0,1,1,-3,2
,104007,2010/11/18,13:06,5,158,0,0,1,2,0
,104007,2010/11/20,06:10,5,76.3,0,0,1,2,0
,104007,2010/11/20,07:10,5,0,0,1,1,3,2
,104007,2010/11/20,11:13,5,0,0,1,1,-3,2
,104007,2010/11/20,11:59,5,67.1,0,0,1,2,0
,104010,2011/04/29,12:42,5,0,1.25e+08,1,1,1,1
,104010,2011/04/29,12:42,5,0,0,1,1,-3,2
,104010,2011/04/29,18:50,5,119,0,0,1,2,0
,104010,2011/04/30,00:42,5,203,0,0,1,2,0
,104010,2011/04/30,12:42,5,197,0,0,1,2,0
,104010,2011/04/30,18:42,5,295,0,0,1,2,0
,104010,2011/05/01,12:42,5,224,0,0,1,2,0
,104010,2011/05/02,12:44,5,268,0,0,1,2,0
,104010,2011/05/02,17:57,5,216,0,0,1,2,0
,104010,2011/05/04,05:40,5,161,0,0,1,2,0
,104010,2011/05/04,12:40,5,110,0,0,1,2,0
,104010,2011/05/06,03:00,5,66.7,0,0,1,2,0
,104010,2011/05/06,11:36,5,44.5,0,0,1,2,0
,106009,2011/01/28,14:15,5,0,1.25e+08,1,1,1,1
,106009,2011/01/28,14:15,5,0,0,1,1,-3,2
,106009,2011/01/28,20:15,5,52.7,0,0,1,2,0
,106009,2011/01/29,02:15,5,74.6,0,0,1,2,0
,106009,2011/01/29,14:15,5,85.2,0,0,1,2,0
,106009,2011/01/30,02:15,5,94.6,0,0,1,2,0
,106009,2011/01/30,14:15,5,102,0,0,1,2,0
,106009,2011/01/31,12:48,5,138,0,0,1,2,0
,106009,2011/01/31,13:05,5,0,0,1,1,3,2
,106009,2011/01/31,17:05,5,0,0,1,1,-3,2
,106009,2011/01/31,18:12,5,105,0,0,1,2,0
,106009,2011/02/02,14:07,5,118,0,0,1,2,0
,106009,2011/02/02,16:50,5,0,0,1,1,3,2
,106009,2011/02/02,20:50,5,0,0,1,1,-3,2
,106009,2011/02/02,22:01,5,95.1,0,0,1,2,0
,106009,2011/02/04,13:34,5,72.9,0,0,1,2,0
,106009,2011/02/04,15:54,5,0,0,1,1,3,2
,106009,2011/02/04,20:06,5,0,0,1,1,-3,2
,106009,2011/02/04,21:18,5,60.3,0,0,1,2,0
,106009,2011/02/07,00:50,5,0,0,1,1,-3,2
,106009,2011/02/07,11:02,5,39.4,0,0,1,2,0
,106009,2011/02/07,17:20,5,0,0,1,1,3,2
,106009,2011/02/09,01:05,5,0,0,1,1,-3,2
,106009,2011/02/09,17:05,5,0,0,1,1,3,2
,106009,2011/02/11,01:23,5,0,0,1,1,-3,2
,106009,2011/02/11,08:49,5,30,0,0,2,2,0
,106009,2011/02/11,17:15,5,0,0,1,1,3,2
,106009,2011/02/14,01:17,5,0,0,1,1,-3,2
,106009,2011/02/14,08:44,5,30,0,0,2,2,0
,106009,2011/02/14,17:17,5,0,0,1,1,3,2
,106009,2011/02/16,01:20,5,0,0,1,1,-3,2
,106009,2011/02/16,17:20,5,0,0,1,1,3,2
,106009,2011/02/18,01:08,5,0,0,1,1,-3,2
,106009,2011/02/18,17:02,5,0,0,1,1,3,2
,106009,2011/02/21,01:04,5,0,0,1,1,-3,2
,106009,2011/02/21,17:04,5,0,0,1,1,3,2
,106009,2011/02/23,17:39,5,0,0,1,1,3,2
,106009,2011/02/23,21:45,5,0,0,1,1,-3,2
,106009,2011/02/25,16:55,5,0,0,1,1,3,2
,106009,2011/02/25,20:56,5,0,0,1,1,-3,2
,106009,2011/02/28,01:06,5,0,0,1,1,-3,2
,106009,2011/02/28,17:21,5,0,0,1,1,3,2
,106009,2011/03/02,01:01,5,0,0,1,1,-3,2
,106009,2011/03/02,17:05,5,0,0,1,1,3,2
-----Original
Message-----
From: Luann Phillips [mailto: [email protected] ]
Sent: Wednesday, July 20, 2011 9:45 AM
To: Xiao Hu
Cc: [email protected]
Subject: Re: [NMusers] Modeling Hemodialysis clearance
Xiao Hu,
I think it may be a problem with identifiability. It
can't separate the definition of K23 from K20 unless
there are measurements during elimination for hemo.
patients off dialysis and on dialysis.
Thoughts:
(1) Try making K20=0 for hemodialysis patients
Assumes: no elimination except during hemodialysis via
K23
(2) Estimate a different theta for K20 in hemodialysis
patients since it should be different for them (bi-modal
distribution)
Assumes: very small elimination from central & with
additive elimination from hemodialysis via K23.
Regards,
Luann Phillips
Director, PK/PD
Cognigen Corporation
Xiao Hu wrote:
> Dear NM users,
>
>
>
> I'm working on a PK model in renal disease patients
with hemodialysis.
> The drug in healthy subjects is well described with
a first-order
> absorption and one-compartment disposition model.
A third
> hemodialysis compartment was added; CMT=3 or -3
were included in the
> data set to turn this compartment on and off.
However, the 3rd
> compartment did not seem to be turned off, based on
the fact that the
> same results were obtained whether I excluded the
EVID==2 record or
> not (corresponding to CMT==3 or -3). Both ADVAN6
and ADVAN7 provided
> the same results as well. The code and partial
data set are shown
> below. I'm wondering if you can point me to the
right direction. I'd really appreciate your input.
Thanks!
>
>
>
> Best regards,
>
> Xiao
>
>
>
> $INPUT C ID DAT2=DROP TIME GROUP DV AMT MDV TYPE
CMT EVID
>
>
>
> $DATA .\DATA\FINAL\105RI101ESRDPK.CSV
>
> IGNORE=C IGN(GROUP.NE.5) ;IGN(EVID.EQ.2)
>
>
>
> $SUBROUTINES ADVAN7 ;ADVAN6 TOL=8
>
>
>
> $MODEL
>
> COMP=(DEPOT,INITIALOFF,DEFDOSE)
>
> COMP=(CENTRAL,DEFOBS,NOOFF)
>
> COMP=(HEMODIA,INITIALOFF)
>
>
>
> $PK
>
> K12=THETA(1)
>
> K20=THETA(2)
>
> K23=THETA(3)
>
> K32=0
>
> V2=THETA(4)*EXP(ETA(1))
>
> S2=V2
>
> $ERROR
>
> Y=F*EXP(EPS(1))
>
> IPRE=F
>
>
>
> ;$DES
>
> ;DADT(1)=-K12*A(1)
>
> ;DADT(2)=K12*A(1)-K23*A(2)-K20*A(2)
>
> ;DADT(3)=K23*A(2)
>
>
>
> $THETA
>
> (0,0.1) ;THETA1 K12
>
> (0,0.05) ;THETA2 K20
>
> (0,.102) ;THETA3 K23
>
> (0,200000) ;THETA6 V2
>
>
>
> $OMEGA
>
> 0.2
>
> $SIGMA
>
> 0.2
>
>
>
> $ESTIMATION MAXEVAL=9999 METH=COND PRINT=5
MSFO=ESRD.MSF
> FILE=ESRD.EXT
>
>
,102001,2010/05/11,08:35,2,82.2,0,0,1,2,0
>
> ,102002,2010/06/30,8:00,2,0,1.25e+08,1,1,1,1
>
> ,102002,2010/06/30,8:00,2,0,0,1,1,-3,2
>
> ,102002,2010/06/30,14:03,2,416,0,0,1,2,0
>
> ,102002,2010/06/30,21:00,2,727,0,0,1,2,0
>
> ,102002,2010/07/01,08:21,2,1040,0,0,1,2,0
>
> ,102002,2010/07/01,20:00,2,1070,0,0,1,2,0
>
> ,102002,2010/07/02,08:06,2,719,0,0,1,2,0
>
> ,102002,2010/07/03,08:00,2,580,0,0,1,2,0
>
> ,102002,2010/07/04,08:00,2,518,0,0,1,2,0
>
> ,102002,2010/07/07,08:00,2,127,0,0,1,2,0
>
> ,102002,2010/07/10,08:00,2,35.2,0,0,1,2,0
>
> ,102002,2010/07/14,08:08,2,30,0,0,2,2,0
>
> ,102002,2010/07/17,08:00,2,30,0,0,2,2,0
>
> ,102002,2010/07/21,08:00,2,30,0,0,2,2,0
>
> ,102002,2010/07/23,15:05,2,30,0,0,2,2,0
>
> ,102002,2010/07/28,08:21,2,30,0,0,2,2,0
>
> ,102003,2010/08/06,8:35,3,0,1.25e+08,1,1,1,1
>
> ,102003,2010/08/06,8:35,3,0,0,1,1,-3,2
>
> ,102003,2010/08/06,14:35,3,132,0,0,1,2,0
>
> ,102003,2010/08/06,20:35,3,189,0,0,1,2,0
>
> ,102003,2010/08/07,08:35,3,210,0,0,1,2,0
>
> ,102003,2010/08/07,20:35,3,246,0,0,1,2,0
>
> ,102003,2010/08/08,08:35,3,221,0,0,1,2,0
>
> ,102003,2010/08/09,08:35,3,236,0,0,1,2,0
>
> ,102003,2010/08/10,08:35,3,180,0,0,1,2,0
>
> ,102003,2010/08/13,08:35,3,55.9,0,0,1,2,0
>
> ,102004,2010/08/31,7:40,3,0,1.25e+08,1,1,1,1
>
> ,102004,2010/08/31,7:40,3,0,0,1,1,-3,2
>
> ,102004,2010/08/31,13:52,3,309,0,0,1,2,0
>
> ,102004,2010/08/31,19:40,3,252,0,0,1,2,0
>
> ,102004,2010/09/01,07:40,3,224,0,0,1,2,0
>
> ,102004,2010/09/01,19:43,3,265,0,0,1,2,0
>
> ,102004,2010/09/02,07:40,3,306,0,0,1,2,0
>
> ,102004,2010/09/03,07:40,3,328,0,0,1,2,0
>
> ,102004,2010/09/04,07:40,3,206,0,0,1,2,0
>
> ,102004,2010/09/07,07:40,3,37.6,0,0,1,2,0
>
Luann,
Turning a compartment on or off just controls when something accumulates in a compartment. It does not change any of the clearances (or rate constants if you wish) that determine what would go into the compartment. The rest of the PK system must continue to function whether or not the amount in an output compartment is accumulated or not.
As you note this feature was originally motivated to allow observed amounts that accumulate in a compartment to be modelled. The most obvious example is collecting urine and measuring the amount in the collection. Each urine collection has its own start and stop time so this is signalled in the data by turning the CMT off (to make the amount zero) and then on again at the start of the collection interval. The amount in the compartment at the end of the collection interval can then be used as a prediction of the observed amount.
This mechanism can be used for other purposes e.g. I have used it to model the accumulation of drug in a skin patch that is put on the skin and taken off the skin at known times.
Nick
Quoted reply history
On 22/07/2011 2:32 a.m., Luann Phillips wrote:
> Xiao Hu,
>
> The concept of turning on/off compartments was presented to me in the context of modeling urine and plasma data. To model urine data correctly, when the cmt is shut off the rate going to the urine cmt would also have to be shut off. So in your case, I believe the K23 portion of the equation would be shut off.
>
> I would be very surprised if this feature is not working correctly because I would think there would have been a bug report previously. However after further examining your code yesterday, I don't see anything that would prevent NM from turning the cmt on and off
>
> (A) So I'm curious. When you use the on/off method what estimate for K23 are you getting?
>
> If it is very small, you wouldn't see the impact of the cmt turning and off because the amount going into the 3rd cmt will be negligible. If this is happening, most likely NM can not distinguish K20 and K23 based upon the data that you have provided.
>
> If K20 theoretically should be small for a hemodialysis subject, I would temporarily fix K20 to 0 for those patients and run the model again. Doing this, I think you will see that the cmt is turning on and off. If this works and the assumption of K20=0 is really bothersome, then I would try estimating a different K20 for the hemodialysis patients. See code below.
>
> Setting K20=0 Example
>
> HFLG=0 ;non-hemodialysis subject
> IF(GRP.EQ.#) HFLG=1 ;hemodialysis subject
> K20= (1-HFLG)*THETA(2)
>
> Separate estimates
>
> HFLG=0 ;non-hemodialysis subject
> IF(GRP.EQ.#) HFLG=1 ;hemodialysis subject
> K20= (1-HFLG)*THETA(2) + HFLG*THETA(5)
>
> (B) In the case of using flag variables to change 'K23' to 0,remember to consider how NM steps between observed time points and what values of the 'user defined' data items it is using when setting your flag variable.
>
> This information is obtained from $BIND in help since it also describes the default behaviors. In your case, think of the t described as an additional dose or lagged dose as any time t between 2 event records.
>
> $BIND help
> Let t be a time at which an additional or lagged dose enters the sys-
> tem. If t1 is the greatest event time not exceeding the time t, then
> the "last event record" is the last event record with event time t1,
> and the "next event record" is the event record following the last
> event record. The event time on the next event record will exceed
> time t.
> ....
>
> For user (concomitant) data items, the default is NEXT but any of
> DOSE, NEXT, LAST may be specified.
>
> Take away:
> TIME=t1 "last event record" FLG=1
> T=t times not included in the data between t1 and t2
> TIME=t2 "next event record" FLG=0
>
> Your flag would be a user(concomitant) data item, so the default is to use values from the NEXT event record for times between t1 and t2. Therefore, for times between t1 and t2 the FLG value would be 0.
>
> Regards,
> Luann Phillips
> Director PK/PD
> Cognigen Corporation
>
> Xiao Hu wrote:
>
> > Dear NM users,
> >
> > I’m working on a PK model in renal disease patients with hemodialysis. The drug in healthy subjects is well described with a first-order absorption and one-compartment disposition model. A third hemodialysis compartment was added; CMT=3 or -3 were included in the data set to turn this compartment on and off. However, the 3rd compartment did not seem to be turned off, based on the fact that the same results were obtained whether I excluded the EVID==2 record or not (corresponding to CMT==3 or -3). Both ADVAN6 and ADVAN7 provided the same results as well. The code and partial data set are shown below. I’m wondering if you can point me to the right direction. I’d really appreciate your input. Thanks!
> >
> > Best regards,
> >
> > Xiao
> >
> > $INPUT C ID DAT2=DROP TIME GROUP DV AMT MDV TYPE CMT EVID
> >
> > $DATA .\DATA\FINAL\105RI101ESRDPK.CSV
> >
> > IGNORE=C IGN(GROUP.NE.5) ;IGN(EVID.EQ.2)
> >
> > $SUBROUTINES ADVAN7 ;ADVAN6 TOL=8
> >
> > $MODEL
> >
> > COMP=(DEPOT,INITIALOFF,DEFDOSE)
> >
> > COMP=(CENTRAL,DEFOBS,NOOFF)
> >
> > COMP=(HEMODIA,INITIALOFF)
> >
> > $PK
> >
> > K12=THETA(1)
> >
> > K20=THETA(2)
> >
> > K23=THETA(3)
> >
> > K32=0
> >
> > V2=THETA(4)*EXP(ETA(1))
> >
> > S2=V2
> >
> > $ERROR
> >
> > Y=F*EXP(EPS(1))
> >
> > IPRE=F
> >
> > ;$DES
> >
> > ;DADT(1)=-K12*A(1)
> >
> > ;DADT(2)=K12*A(1)-K23*A(2)-K20*A(2)
> >
> > ;DADT(3)=K23*A(2)
> >
> > $THETA
> >
> > (0,0.1) ;THETA1 K12
> >
> > (0,0.05) ;THETA2 K20
> >
> > (0,.102) ;THETA3 K23
> >
> > (0,200000) ;THETA6 V2
> >
> > $OMEGA
> >
> > 0.2
> >
> > $SIGMA
> >
> > 0.2
> >
> > $ESTIMATION MAXEVAL=9999 METH=COND PRINT=5 MSFO=ESRD.MSF FILE=ESRD.EXT
> >
> > C,ID,DATE,TIME,GROUP,CONC,AMT,MDV,TYPE,CMT,EVID
> >
> > ,102001,2010/05/04,8:35,2,0,6.3e+07,1,1,1,1
> >
> > ,102001,2010/05/04,8:35,2,0,0,1,1,-3,2
> >
> > ,102001,2010/05/04,14:39,2,177,0,0,1,2,0
> >
> > ,102001,2010/05/04,20:35,2,190,0,0,1,2,0
> >
> > ,102001,2010/05/05,08:35,2,144,0,0,1,2,0
> >
> > ,102001,2010/05/05,20:35,2,145,0,0,1,2,0
> >
> > ,102001,2010/05/06,08:37,2,135,0,0,1,2,0
> >
> > ,102001,2010/05/07,08:41,2,139,0,0,1,2,0
> >
> > ,102001,2010/05/08,08:35,2,177,0,0,1,2,0
> >
> > ,102001,2010/05/11,08:35,2,82.2,0,0,1,2,0
> >
> > ,102002,2010/06/30,8:00,2,0,1.25e+08,1,1,1,1
> >
> > ,102002,2010/06/30,8:00,2,0,0,1,1,-3,2
> >
> > ,102002,2010/06/30,14:03,2,416,0,0,1,2,0
> >
> > ,102002,2010/06/30,21:00,2,727,0,0,1,2,0
> >
> > ,102002,2010/07/01,08:21,2,1040,0,0,1,2,0
> >
> > ,102002,2010/07/01,20:00,2,1070,0,0,1,2,0
> >
> > ,102002,2010/07/02,08:06,2,719,0,0,1,2,0
> >
> > ,102002,2010/07/03,08:00,2,580,0,0,1,2,0
> >
> > ,102002,2010/07/04,08:00,2,518,0,0,1,2,0
> >
> > ,102002,2010/07/07,08:00,2,127,0,0,1,2,0
> >
> > ,102002,2010/07/10,08:00,2,35.2,0,0,1,2,0
> >
> > ,102002,2010/07/14,08:08,2,30,0,0,2,2,0
> >
> > ,102002,2010/07/17,08:00,2,30,0,0,2,2,0
> >
> > ,102002,2010/07/21,08:00,2,30,0,0,2,2,0
> >
> > ,102002,2010/07/23,15:05,2,30,0,0,2,2,0
> >
> > ,102002,2010/07/28,08:21,2,30,0,0,2,2,0
> >
> > ,102003,2010/08/06,8:35,3,0,1.25e+08,1,1,1,1
> >
> > ,102003,2010/08/06,8:35,3,0,0,1,1,-3,2
> >
> > ,102003,2010/08/06,14:35,3,132,0,0,1,2,0
> >
> > ,102003,2010/08/06,20:35,3,189,0,0,1,2,0
> >
> > ,102003,2010/08/07,08:35,3,210,0,0,1,2,0
> >
> > ,102003,2010/08/07,20:35,3,246,0,0,1,2,0
> >
> > ,102003,2010/08/08,08:35,3,221,0,0,1,2,0
> >
> > ,102003,2010/08/09,08:35,3,236,0,0,1,2,0
> >
> > ,102003,2010/08/10,08:35,3,180,0,0,1,2,0
> >
> > ,102003,2010/08/13,08:35,3,55.9,0,0,1,2,0
> >
> > ,102004,2010/08/31,7:40,3,0,1.25e+08,1,1,1,1
> >
> > ,102004,2010/08/31,7:40,3,0,0,1,1,-3,2
> >
> > ,102004,2010/08/31,13:52,3,309,0,0,1,2,0
> >
> > ,102004,2010/08/31,19:40,3,252,0,0,1,2,0
> >
> > ,102004,2010/09/01,07:40,3,224,0,0,1,2,0
> >
> > ,102004,2010/09/01,19:43,3,265,0,0,1,2,0
> >
> > ,102004,2010/09/02,07:40,3,306,0,0,1,2,0
> >
> > ,102004,2010/09/03,07:40,3,328,0,0,1,2,0
> >
> > ,102004,2010/09/04,07:40,3,206,0,0,1,2,0
> >
> > ,102004,2010/09/07,07:40,3,37.6,0,0,1,2,0
--
Nick Holford, Professor Clinical Pharmacology
Dept Pharmacology& Clinical Pharmacology
University of Auckland,85 Park Rd,Private Bag 92019,Auckland,New Zealand
tel:+64(9)923-6730 fax:+64(9)373-7090 mobile:+64(21)46 23 53
email: [email protected]
http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford
I found the following note from Tom very helpful and want to share with other
users.
"It would be necessary to use the correct HEMO value with the understanding
that the covariate value at TIME=X2 applies to the interval from TIME=X1 up to
TIME=X2, X1<X2."
Quoted reply history
-----Original Message-----
From: Ludden, Thomas [mailto:[email protected]]
Sent: Thursday, July 21, 2011 3:08 PM
To: Xiao Hu
Cc: Bauer, Robert
Subject: FW: [NMusers] Modeling Hemodialysis clearance
Hi Xiao,
If the hemodialysate is being directly analyzed then the ON/OFF feature can be
used as for urine.
However, if the hemodialysate is not being directly analyzed, I am not certain
one needs the ON/OFF feature. Perhaps one just needs to have a
change in clearance.
Without Hemodialysis: CL=CL1
With Hemodialysis: CL=CL1+CL2
I think this could be modeled using a covariate in the data set:
HEMO=0/1
If HEMO=0 then CL=CL1 during periods without hemodialysis
If HEMO=1 then CL=CL1+CL2 during periods with hemodialysis
Where CL1 and CL2 could be modeled with THETA's and perhaps ETA's
It would be necessary to use the correct HEMO value with the understanding that
the covariate value at TIME=X2 applies to the interval from TIME=X1 up to
TIME=X2, X1<X2.
A caveat: The discontinuous change in clearance might be problematic for
derivatives.
Tom