;; Initial estimates by nlmx autoinit — group: all ;; 16 subjects, 160 observations, route: oral ;; Paste the blocks below into your control stream; check them against the data first. ;; ---- 1 compartment, first-order absorption ---- $SUBROUTINES ADVAN2 TRANS2 $PK CL = THETA(1)*EXP(ETA(1)) V = THETA(2)*EXP(ETA(2)) KA = THETA(3)*EXP(ETA(3)) S2 = V/1000 ; volumes and clearances are in the units of this scale $ERROR IPRED = F W = SQRT(THETA(4)**2*IPRED**2 + THETA(5)**2) Y = IPRED + W*EPS(1) $THETA (0, 3.0227) ; CL (clearance) (0, 39.8145) ; V (central volume) (0, 1.2998) ; KA (absorption rate) (0, 3.0000E-2) ; proportional error (CV) (0, 31.7699) ; additive error (SD) $OMEGA 3.4234E-2 ; IIV CL (CV 19%) 1.7382E-2 ; IIV V (CV 13%) 5.9290E-2 ; IIV KA (CV 25%) $SIGMA 1 FIX ; the error magnitudes are THETAs ;; ---- 2 compartments, first-order absorption ---- $SUBROUTINES ADVAN4 TRANS4 $PK CL = THETA(1)*EXP(ETA(1)) V2 = THETA(2)*EXP(ETA(2)) Q = THETA(3) V3 = THETA(4) KA = THETA(5)*EXP(ETA(3)) S2 = V2/1000 ; volumes and clearances are in the units of this scale $ERROR IPRED = F W = SQRT(THETA(6)**2*IPRED**2 + THETA(7)**2) Y = IPRED + W*EPS(1) $THETA (0, 3.0227) ; CL (clearance) (0, 15.9258) ; V2 (central volume) (0, 3.0227) ; Q (intercompartmental clearance) (0, 23.8887) ; V3 (peripheral volume) (0, 1.2998) ; KA (absorption rate) (0, 3.0000E-2) ; proportional error (CV) (0, 31.7699) ; additive error (SD) $OMEGA 3.4234E-2 ; IIV CL (CV 19%) 1.7382E-2 ; IIV V2 (CV 13%) 5.9290E-2 ; IIV KA (CV 25%) $SIGMA 1 FIX ; the error magnitudes are THETAs ;; ---- 3 compartments, first-order absorption ---- $SUBROUTINES ADVAN12 TRANS4 $PK CL = THETA(1)*EXP(ETA(1)) V2 = THETA(2)*EXP(ETA(2)) Q3 = THETA(3) V3 = THETA(4) Q4 = THETA(5) V4 = THETA(6) KA = THETA(7)*EXP(ETA(3)) S2 = V2/1000 ; volumes and clearances are in the units of this scale $ERROR IPRED = F W = SQRT(THETA(8)**2*IPRED**2 + THETA(9)**2) Y = IPRED + W*EPS(1) $THETA (0, 3.0227) ; CL (clearance) (0, 15.9258) ; V2 (central volume) (0, 3.0227) ; Q3 (intercompartmental clearance) (0, 23.8887) ; V3 (peripheral volume) (0, 1.5114) ; Q4 (second intercompartmental clearance) (0, 23.8887) ; V4 (second peripheral volume) (0, 1.2998) ; KA (absorption rate) (0, 3.0000E-2) ; proportional error (CV) (0, 31.7699) ; additive error (SD) $OMEGA 3.4234E-2 ; IIV CL (CV 19%) 1.7382E-2 ; IIV V2 (CV 13%) 5.9290E-2 ; IIV KA (CV 25%) $SIGMA 1 FIX ; the error magnitudes are THETAs ;; ---- 1 compartment, first-order absorption, transit compartments (Savic: MTT, NN) ---- $SUBROUTINES ADVAN13 TOL=6 $MODEL COMP=(DEPOT,DEFDOSE) COMP=(CENTRAL,DEFOBS) $PK CL = THETA(1)*EXP(ETA(1)) V = THETA(2)*EXP(ETA(2)) KA = THETA(3)*EXP(ETA(3)) MTT = THETA(4) NN = THETA(5) KTR = (NN + 1)/MTT LNFAC = GAMLN(NN + 1) IF (NEWIND.NE.2) THEN PODO = 0 TDOS = 0 ENDIF IF (AMT.GT.0.AND.CMT.EQ.1) THEN PODO = AMT TDOS = TIME ENDIF F1 = 0 $DES CF = A(2)/V TAD = T - TDOS INPT = 0 IF (TAD.GT.0.AND.PODO.GT.0) INPT = EXP(LOG(PODO) + LOG(KTR) + NN*LOG(KTR*TAD) - KTR*TAD - LNFAC) DADT(1) = INPT - KA*A(1) DADT(2) = KA*A(1) - CL*CF $ERROR CP = A(2)/(V/1000) ; volumes and clearances are in the units of this scale IPRED = CP W = SQRT(THETA(6)**2*IPRED**2 + THETA(7)**2) Y = IPRED + W*EPS(1) $THETA (0, 3.0227) ; CL (clearance) (0, 39.8145) ; V (central volume) (0, 1.2998) ; KA (absorption rate) (0, 7.6934E-1) ; MTT (mean transit time) (0, 3) ; NN (number of transit compartments) (0, 3.0000E-2) ; proportional error (CV) (0, 31.7699) ; additive error (SD) $OMEGA 3.4234E-2 ; IIV CL (CV 19%) 1.7382E-2 ; IIV V (CV 13%) 5.9290E-2 ; IIV KA (CV 25%) $SIGMA 1 FIX ; the error magnitudes are THETAs ;; ---- 2 compartments, first-order absorption, transit compartments (Savic: MTT, NN) ---- $SUBROUTINES ADVAN13 TOL=6 $MODEL COMP=(DEPOT,DEFDOSE) COMP=(CENTRAL,DEFOBS) COMP=(PERIPH1) $PK CL = THETA(1)*EXP(ETA(1)) V2 = THETA(2)*EXP(ETA(2)) Q = THETA(3) V3 = THETA(4) KA = THETA(5)*EXP(ETA(3)) MTT = THETA(6) NN = THETA(7) KTR = (NN + 1)/MTT LNFAC = GAMLN(NN + 1) IF (NEWIND.NE.2) THEN PODO = 0 TDOS = 0 ENDIF IF (AMT.GT.0.AND.CMT.EQ.1) THEN PODO = AMT TDOS = TIME ENDIF F1 = 0 $DES CF = A(2)/V2 TAD = T - TDOS INPT = 0 IF (TAD.GT.0.AND.PODO.GT.0) INPT = EXP(LOG(PODO) + LOG(KTR) + NN*LOG(KTR*TAD) - KTR*TAD - LNFAC) DADT(1) = INPT - KA*A(1) DADT(2) = KA*A(1) - CL*CF - Q*CF + Q/V3*A(3) DADT(3) = Q*CF - Q/V3*A(3) $ERROR CP = A(2)/(V2/1000) ; volumes and clearances are in the units of this scale IPRED = CP W = SQRT(THETA(8)**2*IPRED**2 + THETA(9)**2) Y = IPRED + W*EPS(1) $THETA (0, 3.0227) ; CL (clearance) (0, 15.9258) ; V2 (central volume) (0, 3.0227) ; Q (intercompartmental clearance) (0, 23.8887) ; V3 (peripheral volume) (0, 1.2998) ; KA (absorption rate) (0, 7.6934E-1) ; MTT (mean transit time) (0, 3) ; NN (number of transit compartments) (0, 3.0000E-2) ; proportional error (CV) (0, 31.7699) ; additive error (SD) $OMEGA 3.4234E-2 ; IIV CL (CV 19%) 1.7382E-2 ; IIV V2 (CV 13%) 5.9290E-2 ; IIV KA (CV 25%) $SIGMA 1 FIX ; the error magnitudes are THETAs ;; ---- 3 compartments, first-order absorption, transit compartments (Savic: MTT, NN) ---- $SUBROUTINES ADVAN13 TOL=6 $MODEL COMP=(DEPOT,DEFDOSE) COMP=(CENTRAL,DEFOBS) COMP=(PERIPH1) COMP=(PERIPH2) $PK CL = THETA(1)*EXP(ETA(1)) V2 = THETA(2)*EXP(ETA(2)) Q3 = THETA(3) V3 = THETA(4) Q4 = THETA(5) V4 = THETA(6) KA = THETA(7)*EXP(ETA(3)) MTT = THETA(8) NN = THETA(9) KTR = (NN + 1)/MTT LNFAC = GAMLN(NN + 1) IF (NEWIND.NE.2) THEN PODO = 0 TDOS = 0 ENDIF IF (AMT.GT.0.AND.CMT.EQ.1) THEN PODO = AMT TDOS = TIME ENDIF F1 = 0 $DES CF = A(2)/V2 TAD = T - TDOS INPT = 0 IF (TAD.GT.0.AND.PODO.GT.0) INPT = EXP(LOG(PODO) + LOG(KTR) + NN*LOG(KTR*TAD) - KTR*TAD - LNFAC) DADT(1) = INPT - KA*A(1) DADT(2) = KA*A(1) - CL*CF - Q3*CF + Q3/V3*A(3) - Q4*CF + Q4/V4*A(4) DADT(3) = Q3*CF - Q3/V3*A(3) DADT(4) = Q4*CF - Q4/V4*A(4) $ERROR CP = A(2)/(V2/1000) ; volumes and clearances are in the units of this scale IPRED = CP W = SQRT(THETA(10)**2*IPRED**2 + THETA(11)**2) Y = IPRED + W*EPS(1) $THETA (0, 3.0227) ; CL (clearance) (0, 15.9258) ; V2 (central volume) (0, 3.0227) ; Q3 (intercompartmental clearance) (0, 23.8887) ; V3 (peripheral volume) (0, 1.5114) ; Q4 (second intercompartmental clearance) (0, 23.8887) ; V4 (second peripheral volume) (0, 1.2998) ; KA (absorption rate) (0, 7.6934E-1) ; MTT (mean transit time) (0, 3) ; NN (number of transit compartments) (0, 3.0000E-2) ; proportional error (CV) (0, 31.7699) ; additive error (SD) $OMEGA 3.4234E-2 ; IIV CL (CV 19%) 1.7382E-2 ; IIV V2 (CV 13%) 5.9290E-2 ; IIV KA (CV 25%) $SIGMA 1 FIX ; the error magnitudes are THETAs