___________________________________________________________________
| |
| ROCM50 EXAMPLE |
|_________________________________________________________________|
This example illustrates the use of rocm50.
(See rocm50).
This example is a modification of CONTROL4 from the NONMEM distribu-
tion CD.
Example 1. NONMEM VI 1.0 and 1.1
With NONMEM VI 1.0 and 1.1, the variables from the common may be used
only in verbatim code.
$PROB THEOPHYLLINE POPULATION DATA
$INPUT ID DOSE TIME CP=DV WT
$DATA THEO
$PRED
;THETA(1)=MEAN ABSORPTION RATE CONSTANT (1/HR)
;THETA(2)=MEAN ELIMINATION RATE CONSTANT (1/HR)
;THETA(3)=SLOPE OF CLEARANCE VS WEIGHT RELATIONSHIP (LITERS/HR/KG)
;DOSE=WT-ADJUSTED DOSE (MG/KG)
;DS=NON-WT-ADJUSTED DOSE (MG)
"FIRST
" COMMON /ROCM50/ IIDX(1000),CNTID(1000)
" DOUBLE PRECISION CNTID
" INTEGER IIDX
IF (DOSE.NE.0) THEN
DS=DOSE*WT
W=WT
ENDIF
KA=THETA(1)+ETA(1)
KE=THETA(2)+ETA(2)
CL=THETA(3)*W+ETA(3)
D=EXP(-KE*TIME)-EXP(-KA*TIME)
E=CL*(KA-KE)
F=DS*KE*KA/E*D
Y=F+EPS(1)
IF (ICALL.EQ.3) THEN
" DO 100 I=1,NINDR
" WRITE (70,*) IIDX(I),CNTID(I)
" 100 CONTINUE
ENDIF
$THETA (.1,3,5) (.008,.08,.5) (.004,.04,.9)
$OMEGA BLOCK(3) 6 .005 .0002 .3 .006 .4
$SIGMA .4
$EST MAXEVAL=450 PRINT=5
Example 2. NONMEM VI 2.0 and later. |
With NONMEM VI 2.0, the variables from the common may be used in |
abbreviated code. Note that they must NOT be defined in verbatim code! |
Any control stream that uses verbatim code to display CNTID and/or |
IIDX will no longer work. If the variable names CNTID and/or IIDX are |
used in the verbatim code, then there will be an error message from |
the compiler. If different variable names are used, there will be no |
error message, but the values displayed by the verbatim code will be |
0's. |
$PROB THEOPHYLLINE POPULATION DATA |
$INPUT ID DOSE TIME CP=DV WT |
$DATA THEO |
$PRED |
;THETA(1)=MEAN ABSORPTION RATE CONSTANT (1/HR) |
;THETA(2)=MEAN ELIMINATION RATE CONSTANT (1/HR) |
;THETA(3)=SLOPE OF CLEARANCE VS WEIGHT RELATIONSHIP (LITERS/HR/KG) |
;DOSE=WT-ADJUSTED DOSE (MG/KG) |
;DS=NON-WT-ADJUSTED DOSE (MG) |
IF (DOSE.NE.0) THEN |
DS=DOSE*WT |
W=WT |
ENDIF |
KA=THETA(1)+ETA(1) |
KE=THETA(2)+ETA(2) |
CL=THETA(3)*W+ETA(3) |
D=EXP(-KE*TIME)-EXP(-KA*TIME) |
E=CL*(KA-KE) |
F=DS*KE*KA/E*D |
Y=F+EPS(1) |
IF (ICALL.EQ.3) THEN |
WRITE (70,*) IIDX,CNTID |
ENDIF |
$THETA (.1,3,5) (.008,.08,.5) (.004,.04,.9) |
$OMEGA BLOCK(3) 6 .005 .0002 .3 .006 .4 |
$SIGMA .4 |
$EST MAXEVAL=450 PRINT=5 |
REFERENCES: None.
Go to main index.
Created by nmhelp2html v. 1.0 written by Niclas Jonsson (Modified by AJB 5/2006,11/2007)