+--------------------------------------------------------------------+
 |                                                                    |
 |                          BAYES EXAMPLE 6S                          |
 |                                                                    |
 +--------------------------------------------------------------------+

 This  is  example6s.ctl  from  the  NONMEM 7 distribution medium.  It,
 along with the data file, can be  found  in  the  examples  directory.
 Note the old style syntax for priors.

 ;Model Desc: Receptor Mediated Clearance model with Dynamic Change
 ;            in Receptors
 ;Project Name: nm7examples
 ;Project ID: NO PROJECT DESCRIPTION

 $PROB RUN# example6s (from r2compl)
 $INPUT C SET ID JID TIME DV=CONC DOSE=AMT RATE EVID MDV CMT
 $DATA example6.csv IGNORE=C

 ; The new numerical integration solver is used, although ADVAN=9
 ; is also efficient for this problem.

 $SUBROUTINES ADVAN13 TRANS1 TOL=4
 $MODEL NCOMPARTMENTS=3

 $PRIOR NWPRI NTHETA=8, NETA=8, NTHP=0, NETP=8, NPEXP=1

 $PK
 MU_1=THETA(1)
 MU_2=THETA(2)
 MU_3=THETA(3)
 MU_4=THETA(4)
 MU_5=THETA(5)
 MU_6=THETA(6)
 MU_7=THETA(7)
 MU_8=THETA(8)
 VC=EXP(MU_1+ETA(1))
 K10=EXP(MU_2+ETA(2))
 K12=EXP(MU_3+ETA(3))
 K21=EXP(MU_4+ETA(4))
 VM=EXP(MU_5+ETA(5))
 KMC=EXP(MU_6+ETA(6))
 K03=EXP(MU_7+ETA(7))
 K30=EXP(MU_8+ETA(8))
 S3=VC
 S1=VC
 KM=KMC*S1
 F3=K03/K30

 $DES
 DEL=1.0E-10
 DADT(1) = -(K10+K12)*A(1) + K21*A(2) - VM*A(1)*A(3)/(A(1)+KM+DEL)
 DADT(2) = K12*A(1) - K21*A(2)
 DADT(3) =  -VM*A(1)*A(3)/(A(1)+KM+DEL) - K30*A(3) + K03

 $ERROR
 CALLFL=0
 ETYPE=1
 IF(CMT.NE.1) ETYPE=0
 IPRED=F
 Y = F + F*ETYPE*EPS(1) + F*(1.0-ETYPE)*EPS(2)

 $THETA
 ;Initial Thetas
 ( 4.0 )  ;[MU_1]
 ( -2.1 ) ;[MU_2]
 ( 0.7 )  ;[MU_3]
 ( -0.17 );[MU_4]
 ( 2.2 ) ;[MU_5]
 ( 0.14 )  ;[MU_6]
 ( 3.7 )  ;[MU_7]
 ( -0.7) ;[MU_8]
 ; degrees of freedom for OMEGA prior
 (8 FIXED)           ;[dfo]

 ;Initial Omegas
 $OMEGA BLOCK(8)
 0.2 ;[p]
 -0.0043  ;[f]
 0.2 ;[p]
 0.0048   ;[f]
 -0.0023  ;[f]
 0.2 ;[p]
 0.0032   ;[f]
 0.0059   ;[f]
 -0.0014  ;[f]
 0.2 ;[p]
 0.0029   ;[f]
 0.0027 ;[f]
 -0.00026 ;[f]
 -0.0032  ;[f]
 0.2 ;[p]
 -0.0025  ;[f]
 0.00097  ;[f]
 0.0024   ;[f]
 0.00197  ;[f]
 -0.0080  ;[f]
 0.2 ;[p]
 0.0031   ;[f]
 -0.00571 ;[f]
 0.0030   ;[f]
 -0.0074  ;[f]
 0.0025   ;[f]
 0.0034   ;[f]
 0.2 ;[p]
 0.00973  ;[f]
 0.00862  ;[f]
 0.0041   ;[f]
 0.0046   ;[f]
 0.00061  ;[f]
 -0.0056  ;[f]
 0.0056   ;[f]
 0.2 ;[p]

 ; Omega prior
 $OMEGA BLOCK(8)
 0.2 FIX
 0.0 0.2
 0.0 0.0 0.2
 0.0 0.0 0.0 0.2
 0.0 0.0 0.0 0.0 0.2
 0.0 0.0 0.0 0.0 0.0 0.2
 0.0 0.0 0.0 0.0 0.0 0.0 0.2
 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.2

 $SIGMA  BLOCK(1) 0.1 ;[p]
 ;$SIGMA  BLOCK(1) 0.1 ;[p]
 $SIGMA  BLOCK(1) SAME

 ; Starting with a short iterative two stage analysis brings the
 ; results closer so less time needs to be spent during the burn-in
 ; of the BAYES analysis

 $EST METHOD=ITS INTERACTION SIGL=4 NITER=30 PRINT=1
      FILE=example6s.ext NOABORT NOPRIOR=1 CTYPE=3

 $EST METHOD=IMP INTERACTION SIGL=4 NITER=30 PRINT=1
      FILE=example6s.ext NOABORT NOPRIOR=1 ISAMPLE=100

 $EST METHOD=BAYES INTERACTION NBURN=4000 SIGL=4 NITER=1000
      PRINT=10 CTYPE=3 FILE=example6s.txt NOABORT NOPRIOR=0
      PSAMPLE_M1=1 PSAMPLE_M2=1 PSAMPLE_M3=1

 ; By default, ISAMPLE_M* are 2.  Since there are many data points
 ; per subject, setting these to 1 is enough, and it reduces the
 ; time of the analysis

      ISAMPLE_M1=1 ISAMPLE_M2=1 ISAMPLE_M3=1 IACCEPT=0.4

 $COV MATRIX=R UNCONDITIONAL

REFERENCES: Guide Introduction_7

  
Go to main index.
  
Created by nmhelp2html v. 1.0 written by Niclas Jonsson (Modified by AJB 5/2006,11/2007,10/2012)