Re: [NMusers] Cmax, Tmax, and Time and AUC above threshold such as MIC

From: Leonid Gibiansky <LGibiansky_at_quantpharm.com>
Date: Wed, 12 Dec 2007 15:43:27 -0500

This should work:

   IF(TIME.EQ.0) THEN
     CMAX=0
     TMAX=0
   ENDIF
   CC = A(2)/V2
   IF(CC.GT.CMAX) THEN
     CMAX= CC
     TMAX= T
   ENDIF
   MIC=1
   RT=0
   IF(CC.GT.MIC) RT=1
   DADT(3)=RT ; time above threshold
   DADT(4)=RT*CC ; AUC when CC > MIC

$ERROR
   CC2=A(2)/V2
   CC7=A(7)
   CC8=A(8)

$TABLE ID TIME CMAX TMAX CC2 CC7 CC8


The last record of each patient should provide desired values.


Leonid


--------------------------------------
Leonid Gibiansky, Ph.D.
President, QuantPharm LLC
web: www.quantpharm.com
e-mail: LGibiansky at quantpharm.com
tel: (301) 767 5566




Paul Hutson wrote:
> I would like to identify maximal concentrations in tissue, corresponding
> time of Cmax tissue, and time and AUC of these concentrations above a
> target concentration (eg, MIC for antibiotics or 1 uM for taxol). I
> identified the Cmax and associated Tmax in simulated data for 'tissue'
> in the following code adapted from earlier posts /99jul292004.html
> <http://www.cognigencorp.com/nonmem/nm/99jul292004.html>/ . It works,
> but in the output table I am then required to extract the Cmax and Tmax
> as the maximum values in the $TABLE (eg MAX() in EXCEL, accomplishing
> little with the NONMEM code), or manually as the last value in columns
> 'Cmax' and 'Tmax' before the null values begin.
>
> So to my questions:
>
> 1) How can the singular Cmax value identified by the last non-null value
> in my IF statement be captured (apparently the "read-out" that Prof
> Sheiner referred to in his comments on Cmax in earlier threads) with
> its corresponding Tmax value and saved, for example, in a file such as
> 'patab1'?
>
> 2) In a somewhat related fashion, has anyone code they can suggest to:
> a) Start and stop the elapsed time for which concentrations are
> above an MIC or other specified concentration (or effect)
> b) Store previous time and concentration values so that the AUC
> during this time above MIC can be calculated using trapezoid or
> log-trapezoid methods?
> Many thanks, as always.
> Paul
>
> $SUBROUTINES ADVAN6 TOL=7
> $MODEL
> COMP=(CENTRAL DEFDOSE DEFOBS)
> COMP=(TISSUE)
>
> $PK
> CL=THETA(1)*WGT*EXP(ETA(1)); CL
> V1=THETA(2)*WGT*EXP(ETA(2)); VPARENT
> Q= THETA(3)*WGT; Q
> V2=THETA(4)*WGT; V2
> K10=CL/V1
> K12=Q/V1
> K21=Q/V2
>
> S1=V1
>
> $DES
> D1=-A(1)*(K10+K12)+A(2)*K21
> DADT(1)=D1
> D2=A(1)*K12 - A(2)*K21
> DADT(2)=D2
> IF (D2.GT.0) THEN
> CMax= A(2)/V2
> TMax= TIME
> ELSE
> CMax=0
> TMax=0
> ENDIF
>
> $TABLE ID TIME AMT RATE BOLT WGT CNC1 CNC2 Y1 Y2 CMaX TMaX NOPRINT ONEHEADER
> --
>
> Paul R. Hutson, Pharm.D.
>
> Associate Professor
>
> UW School of Pharmacy
>
> 777 Highland Avenue
>
> Madison WI 53705-2222
>
> Tel 608.263.2496
>
> Fax 608.265.5421
>
> Pager 608.265.7000, p7856
>
Received on Wed Dec 12 2007 - 15:43:27 EST

This archive was generated by hypermail 2.2.0 : Thu Dec 13 2007 - 10:18:39 EST