Back to the Top
Dear All,
I am trying to do a PKPD modeling after a single dose of drug using the
following code, however, the model cannot go through. Part of dataset is
listed below, does anyone can give me some suggestions?
Thanks
John
$INPUT
C ID TIME CP DV MDV
$PRED
E0 =THETA(1) ; Baseline
EMAX=THETA(2) ; Max Effect
CE50=THETA(3) ; CE50,
KE0 =THETA(4)*EXP(ETA(1)) ; Ke0
IF (TIME.EQ.0) THEN
CE = 0 ; Conc at effect site
PTIME = 0 ; Prior Time
PCP = 0 ; Prior plasma concentration
PCE = 0 ; Prior effect site concentration
ENDIF
DT=TIME-PTIME
IF (DT.EQ.0) THEN
DT1=1
ELSE
DT1=DT
ENDIF
IF(CP.GT.PCP) THEN
SLOPE = (CP-PCP)/DT1
DELTA = DT1*SLOPE+(KE0*PCP-SLOPE)*(1-EXP(-KE0*DT1))/KE0
ELSE
SLOPE = (LOG(CP)-LOG(PCP))/DT1
DELTA = PCP*KE0/(KE0+SLOPE)*(EXP(DT1*SLOPE)-EXP(-KE0*DT1))
ENDIF
IF (DT.GT.0) THEN
CE = PCE*EXP(-KE0*DT)+DELTA
ELSE
CE = PCE
ENDIF
; Emax PD model with simple additive error
E = E0 + EMAX*CE/(CE + CE50) ;+ EPS(1)
; Variables for NONMEM to remember at the next iteration
PTIME = TIME ; Prior Time
PCP = CP ; Prior plasma concentration
PCE = CE ; Prior effect site concentration
DEL = 0
IF (E.EQ.0) DEL = 1
IPRE = E ; INDIVIDUAL PREDICTION
IRES = DV - IPRE ; INDIVIDUAL RESIDUAL
IWRE = IRES / (IPRE + DEL) ; INDIVIDUAL WEIGHTED RESIDUAL
Y = E * (1 + EPS(1)) ; ERROR EPS (PROPORTIONAL)
$THETA
(0.5, 7, 20) ; E0
(1, 90, 100) ; EMAX
(0.5, 3, 50) ; EC50
(0.1, 1, 50) ; KE0
$OMEGA
0 FIX ;0.05 ; [E] BETWEEN SUBJECT VARIABILITY (KE0)
$SIGMA
0.02 ; [P] WITHIN SUBJECT VARIABILITY
$COV MATRIX=S PRINT=E
$EST MAXEVAL=9990 METHOD=CONDITIONAL
SIGDIGITS=3 PRINT=10 NOABORT MSF=001.MSF
$TABLE
ID TIME CP CE E0 EMAX CE50 KE0 MDV
ETA1 PRED IPRE IRES IWRE
NOPRINT ONEHEADER FILE=001
C ID TIME CP DV MDV
.. 1 0 0 7.84 0
.. 1 0.5 57.232 34.3 0
.. 1 1 73.5 62.72 0
.. 1 1.5 75.754 76.44 0
.. 1 2 60.662 85.26 0
.. 1 2.5 50.176 85.26 0
.. 1 3 33.222 95.06 0
.. 1 3.5 40.376 50.96 0
.. 1 4 20.874 32.34 0
.. 1 5 7.399 14.7 0
.. 1 6 1.9306 9.8 0
.. 1 7 0.7007 11.76 0
.. 1 8 0.3969 7.84 0
.. 2 0 0 6.86 0
.. 2 0.5 39.69 26.46 0
.. 2 1 28.42 47.04 0
.. 2 1.5 26.46 51.94 0
.. 2 2 13.916 32.34 0
.. 2 2.5 7.4382 23.52 0
.. 2 3 5.0666 31.36 0
.. 2 3.5 2.4402 46.06 0
.. 2 4 0.97412 20.58 0
C 2 5 . . 1
C 2 6 . . 1
C 2 7 . . 1
C 2 8 . . 1
.. 3 0 0 6.86 0
.. 3 0.5 35.28 77.42 0
C 3 1 . . 1
.. 3 1.5 38.612 92.12 0
.. 3 2 30.086 87.22 0
.. 3 2.5 19.502 75.46 0
.. 3 3 14.994 75.46 0
.. 3 3.5 7.056 52.92 0
.. 3 4 1.5582 41.16 0
.. 3 5 0.43512 24.5 0
.. 3 6 0.24892 16.66 0
C 3 7 . . 1
C 3 8 . . 1
Want to post a follow-up message on this topic?
If this link does not work with your browser send a follow-up message to PharmPK@boomer.org with "PKPD model setup" as the subject | Support PharmPK by using the |
Copyright 1995-2011 David W. A. Bourne (david@boomer.org)