From: "Paul Hutson" prhutson@pharmacy.wisc.edu
Subject: [NMusers] Determining metabolite clearance fraction 
Date: Mon, November 29, 2004 9:53 am 

Good morning all.
I have been hammering on this data set for an oral drug with rich data on 
33 pts drawn at basedline (WK4) and after another drug is added 
(WK12).  Using log transformation and FO (ADVAN 9) my runs are now down to 
1-3 hours, depending upon the #ETAs I try to include.
However, I am having a continuing frustration that I seek your collective 
wisdom to resolve.
The drug (tamoxifen) has many metabolites, but primarily the 4OH (M1) and 
N-desmethyl (M2), both which are assayed concurrently in this data set. I 
am trying to determine the fraction of the overall elimination rate that 
arises from the two metabolites.  In addition to the control stream pasted 
below, I have also tried restricting the fraction of K that arises from the 
non-M1, non-M2 metabolites as:

FM3=1-FM1+FM2

In both this approach and that below, I obtain estimates for FM1 + FM2 that 
are < but not equal to 1, but I also find that the final estimate for FM3 
is the same as my initial estimate, in this case, 0.1 or 10%.  I have not 
found a solution in the archives to address this.  Can anyone suggest a 
better way to code so that I can both determine the fraction of K that goes 
to M1 (eg., FM1) and to M2, while limiting the FM1+FM2(+FM3) = 1?

$PROBLEM TAMOXIFEN AND METABOLITES
$INPUT ID WEEK DAY TIME AMT II ADDL SS DV NTDV CMT MDV EVID
$DATA TAM2.CSV IGNORE=C
;ln TRANSFORMED DATA
;$MSFI TAM6.MSF
$SUBROUTINES ADVAN9 TRANS1 TOL=5
$MODEL NPAR=9 NCOMP=4 COMP=(DEPOT,DEFDOSE) COMP=(TAM) COMP=(4OHTAM)
        COMP=(NDESTAM)

$PK
      KA=THETA(1);     KABS

      WK4=THETA(2);                      TVK
      WK12=THETA(8);             WK12
IF(WEEK.EQ.0) THEN
      K=WK4*EXP(ETA(1));
ELSE
      K=WK12*EXP(ETA(1));
ENDIF
      FM1=THETA(3);         FM1   FRACTIONAL 4OH FORMATION
      KM1=THETA(4);         KM1   4OH ELIMINATION

      FM2=THETA(5);                      FM2 FRACTIONAL NDES FORMATION
      KM2=THETA(6);      KM2
      FM3=THETA(9);
      V2=THETA(7)*EXP(ETA(2));      VTAM ASSUMED TO BE SAME FOR TAM & MET;

CL=K/V2;
AUC=AMT/CL
      S2=V2/1000 ; SCALING FOR PARENT
      S3=S2
      S4=S2

$DES
      DADT(1)=-A(1)*KA
      DADT(2)=A(1)*KA-A(2)*K*(FM1+FM2+FM3);  EQ FOR PARENT
      DADT(3)=A(2)*K*FM1-A(3)*KM1;  EQ FOR 4OH METABOLITE "COMPARTMENT"
      DADT(4)=A(2)*K*FM2-A(4)*KM2;  EQ FOR NDESTAM METABOLITE "COMPARTMENT"

$ERROR (OBSERVATION ONLY)
EDV=EXP(DV)

W2=F

LIRES=F-(EXP(DV))
IRES=EXP(LIRES)
IWRES=IRES/W2
R1=0
IF (CMT.EQ.2) R1=1
R2=0
IF (CMT.EQ.3) R2=1
R3=0
IF (CMT.EQ.4) R3=1


Y1=LOG(F)+EPS(1)
Y2=LOG(F)+EPS(2)
Y3=LOG(F)+EPS(3)
Y=R1*Y1+R2*Y2+R3*Y3

$THETA  100 FIXED;      KA
$THETA  (0.00001,0.01,10);      K

$THETA  (0.001,0.15,.9);      FM1
$THETA  (0.0001,0.001,10);      KM1

$THETA  (0.001,0.44,.9);      FM2
$THETA  (0.0001,0.002,10);      KM2

$THETA  (1,2000,100000);      V

$THETA  (0.00001,0.01,10);      WK
$THETA  (0,.1,0.9);     FM3

$OMEGA  2.5;         ETAK1
$OMEGA  2.5;         ETAV

$SIGMA  .2;   ERR1
$SIGMA  .2;   ERR2
$SIGMA  .2;   ERR3

$ESTIMATION METHOD=0 SIGDIGITS=3 MAXEVAL=9999 PRINT=10 POSTHOC
        NOABORT MSFO=tam6.msf

Two subject's worth of data follow:

CID WEEK DAY TIME AMT II ADDL SS DV NATDV CMT MDV EVID
1 0 1 0 20 24 2 2 . . 1 1 1
1 0 1 0 . . . . 5.3845 218 2 0 0
1 0 1 0 . . . . 1.933 6.91 3 0 0
1 0 1 0 . . . . 6.0568 427 4 0 0
1 0 1 0.5 . . . . 5.3471 210 2 0 0
1 0 1 0.5 . . . . 1.8001 6.05 3 0 0
1 0 1 0.5 . . . . 6.0162 410 4 0 0
1 0 1 1 . . . . 5.3613 213 2 0 0
1 0 1 1 . . . . 1.8229 6.19 3 0 0
1 0 1 1 . . . . 6.0113 408 4 0 0
1 0 1 2 . . . . 5.3033 201 2 0 0
1 0 1 2 . . . . 1.9228 6.84 3 0 0
1 0 1 2 . . . . 5.9189 372 4 0 0
1 0 1 4 . . . . 5.2832 197 2 0 0
1 0 1 4 . . . . 1.8672 6.47 3 0 0
1 0 1 4 . . . . 5.7621 318 4 0 0
1 0 1 6 . . . . 5.451 233 2 0 0
1 0 1 6 . . . . 1.9657 7.14 3 0 0
1 0 1 6 . . . . 5.989 399 4 0 0
1 0 2 24 . . . . 5.2311 187 2 0 0
1 0 2 24 . . . . 1.8017 6.06 3 0 0
1 0 2 24 . . . . 5.9296 376 4 0 0
1 0 3 48 . . . . 5.2575 192 2 0 0
1 0 3 48 . . . . 1.7766 5.91 3 0 0
1 0 3 48 . . . . 5.9454 382 4 0 0
1 1 1 0 20 24 2 2 . . 1 1 4
1 1 1 1 . . . . 5.5491 257 2 0 0
1 1 1 1 . . . . 1.9879 7.3 3 0 0
1 1 1 1 . . . . 6.1334 461 4 0 0
1 1 1 2 . . . . 5.4765 239 2 0 0
1 1 1 2 . . . . 1.8641 6.45 3 0 0
1 1 1 2 . . . . 6.0137 409 4 0 0
1 1 1 4 . . . . 5.3423 209 2 0 0
1 1 1 4 . . . . 1.7733 5.89 3 0 0
1 1 1 4 . . . . 5.8289 340 4 0 0
1 1 1 6 . . . . 5.193 180 2 0 0
1 1 1 6 . . . . 1.7246 5.61 3 0 0
1 1 1 6 . . . . 5.6904 296 4 0 0
1 1 2 24 . . . . 5.3132 203 2 0 0
1 1 2 24 . . . . 1.7011 5.48 3 0 0
1 1 2 24 . . . . 5.8171 336 4 0 0
1 1 3 48 . . . . 5.1475 172 2 0 0
1 1 3 48 . . . . 1.744 5.72 3 0 0
1 1 3 48 . . . . 5.793 328 4 0 0
2 0 1 0 20 24 2 2 . . 1 1 1
2 0 1 0 . . . . 5.4723 238 2 0 0
2 0 1 0 . . . . 1.8229 6.19 3 0 0
2 0 1 0 . . . . 6.4362 624 4 0 0
2 0 1 0.5 . . . . 5.4848 241 2 0 0
2 0 1 0.5 . . . . 1.7733 5.89 3 0 0
2 0 1 0.5 . . . . 6.4069 606 4 0 0
2 0 1 1 . . . . 5.4072 223 2 0 0
2 0 1 1 . . . . 1.6074 4.99 3 0 0
2 0 1 1 . . . . 6.1442 466 4 0 0
2 0 1 2 . . . . 5.5373 254 2 0 0
2 0 1 2 . . . . 1.7867 5.97 3 0 0
2 0 1 2 . . . . 6.1612 474 4 0 0
2 0 1 4 . . . . 5.624 277 2 0 0
2 0 1 4 . . . . 1.9169 6.8 3 0 0
2 0 1 4 . . . . 6.3596 578 4 0 0
2 0 1 6 . . . . 5.8464 346 2 0 0
2 0 1 6 . . . . 2.1849 8.89 3 0 0
2 0 1 6 . . . . 6.6619 782 4 0 0
2 0 2 24 . . . . 5.3033 201 2 0 0
2 0 2 24 . . . . 1.763 5.83 3 0 0
2 0 2 24 . . . . 6.0913 442 4 0 0
2 0 3 48 . . . . 5.3613 213 2 0 0
2 0 3 48 . . . . 1.8594 6.42 3 0 0
2 0 3 48 . . . . 6.1841 485 4 0 0
2 1 1 0 20 24 2 2 . . 1 1 4
2 1 1 0 . . . . 5.425 227 2 0 0
2 1 1 0 . . . . 1.9516 7.04 3 0 0
2 1 1 0 . . . . 6.3682 583 4 0 0
2 1 1 0.5 . . . . 5.4806 240 2 0 0
2 1 1 0.5 . . . . 1.9657 7.14 3 0 0
2 1 1 0.5 . . . . 6.3986 601 4 0 0
2 1 1 1 . . . . 5.5134 248 2 0 0
2 1 1 1 . . . . 1.9315 6.9 3 0 0
2 1 1 1 . . . . 6.286 537 4 0 0
2 1 1 2 . . . . 5.2832 197 2 0 0
2 1 1 2 . . . . 1.7334 5.66 3 0 0
2 1 1 2 . . . . 5.8522 348 4 0 0
2 1 1 4 . . . . 5.3845 218 2 0 0
2 1 1 4 . . . . 1.8687 6.48 3 0 0
2 1 1 4 . . . . 5.8916 362 4 0 0
2 1 1 6 . . . . 5.4293 228 2 0 0
2 1 1 6 . . . . 1.9601 7.1 3 0 0
2 1 1 6 . . . . 6.0113 408 4 0 0
2 1 2 24 . . . . 5.112 166 2 0 0
2 1 2 24 . . . . 1.7766 5.91 3 0 0
2 1 2 24 . . . . 5.8665 353 4 0 0
2 1 3 48 . . . . 5.0562 157 2 0 0
2 1 3 48 . . . . 1.7317 5.65 3 0 0
2 1 3 48 . . . . 5.8406 344 4 0 0


Paul Hutson, Pharm.D.
Associate Professor (CHS)
UW School of Pharmacy
777 Highland Avenue
Madison, WI 53705-2222
Tel:    (608) 263-2496
FAX:    (608) 265-5421
Pager: (608) 265-7000, #7856
_______________________________________________________

From: "GIRARD PASCAL" PASCAL.GIRARD@adm.univ-lyon1.fr
Subject: RE: [NMusers] Determining metabolite clearance fraction 
Date:  Mon, November 29, 2004 10:56 am

Good afternoon Paul,

Briefly looking at your issue, it seems that there is no information in your data to
allow you estimating FM3 different from 1. So yes you should have FM3=1-FM1+FM2
rather than an additional THETA(9). In addition I suggest using a logistic
transformation for expressing FM1 and FM2 so that the estimated THETAS 3 and 5 would
be allowed to vary from - to + infinity, rather than the strong constraints 0-1
which make life more difficult for the software. Here is an implementation of the
transformation using your coding:

FM1=(EXP(THETA(3))/(1+ EXP(THETA(3)+ EXP(THETA(5)) ; FM1   FRACTIONAL 4OH FORMATION 
FM2=(EXP(THETA(5))/(1+ EXP(THETA(3)+ EXP(THETA(5)) ; FM2   FRACTIONAL NDES FORMATION 
FM3=1-FM1+FM2 
And in $DES simply put:
DADT(2)=A(1)*KA-A(2)*K;  EQ FOR PARENT

Hope it helps,

Pascal

=========================================Dr Pascal Girard
EA 3738 Ciblage Thérapeutique en Oncologie
Fac Médecine Lyon-Sud
BP12
69921 OULLINS Cedex
France
 
Tel 33 4 78 86 31 53
Fax 33 4 78 86 31 49
e-mail : Pascal.Girard@adm.univ-lyon1.fr
========================================== 
_______________________________________________________

From: "Leonid Gibiansky" leonidg@metrumrg.com
Subject: RE: [NMusers] Determining metabolite clearance fraction 
Date: Mon, November 29, 2004 11:19 am 

Paul,
The way how it is written in the message, the system is not identifiable:
the code should ensure that FM1+FM2+FM3 = 1. You may try to use
     DADT(2)=A(1)*KA-A(2)*K;  EQ FOR PARENT
rather than
    DADT(2)=A(1)*KA-A(2)*K*(FM1+FM2+FM3)
but you may end up with FM1+FM2 > 1.

In the other variant, if you use
FM3=1-(FM1+FM2)
(is this how it was coded? FM3=1-FM1+FM2 is incorrect) you must ensure that
FM3 > 0. I would do the following:

FM1=THETA(3)/(1+THETA(3)+THETA(5) )
FM2=THETA(5)/(1+THETA(3)+THETA(5) )
; FM3=1/(1+THETA(3)+THETA(5) ) do not put this into the code, this is
implicit

     DADT(2)=A(1)*KA-A(2)*K;  use FM1+FM2+MF3=1
     DADT(3)=A(2)*K*FM1-A(3)*KM1;  EQ FOR 4OH METABOLITE "COMPARTMENT"
     DADT(4)=A(2)*K*FM2-A(4)*KM2;  EQ FOR NDESTAM METABOLITE "COMPARTMENT"


Alternative is to use
K23=THETA(.)
K24=THETA(.)
K20=THETA(.) ; direct (or via other metabolites) elimination

     DADT(2)=A(1)*KA-A(2)*(K23+K24+K20);  use FM1+FM2+MF3=1
     DADT(3)=A(2)*K23-A(3)*KM1;  EQ FOR 4OH METABOLITE "COMPARTMENT"
     DADT(4)=A(2)*K24-A(4)*KM2;  EQ FOR NDESTAM METABOLITE "COMPARTMENT"

The drug effect at week 12 and random effects can be added to all or some of
K23,K24,K20. Fractions F1, F2, F3 can be re-computed from Kij values.

This should solve the problem of F1+F2+F3=1.

Leonid
_______________________________________________________

From: "GIRARD PASCAL" PASCAL.GIRARD@adm.univ-lyon1.fr 
Subject: RE: [NMusers] Determining metabolite clearance fraction 
Date:  Mon, November 29, 2004 11:44 am 

Leonid is correct about FM3 which should be equal to 1-(FM1+FM2) rather than
1-FM1+FM2 which I incorrectly copy and pasted from Paul's Email in my own previous
Email. But this has no consequence on the code since FM3 is not used in the code.

The only difference between Leonid's first coding suggestion and logistic transform
is that in Leonid's code you need to constrain THETA(3) and THETA(5) to be positive,
while the logistic transformation allows them to be free of constraints.

Pascal
_______________________________________________________

From: "Miller, Raymond"  
Subject: RE: [NMusers] Determining metabolite clearance fraction 
Date: Mon, November 29, 2004 12:34 pm

Paul,

A simple question.

Don't you think that using R1, R2 and R2 as flags to switch between parent
drug and metabolite in the control stream has confused things.

R is reserved for the rate of input into a particular compartment, so you
may be setting the rates into compartments 1, 2 and  3 as either zero or
one. Try using a different nomenclature i.e. FLG1, FLG2 and FLG3.

Raymond
_______________________________________________________