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

Reply via email to