;; 1. Based on: run3766 ;; 2. Description: 1-cmp PRQ, 1-cmp CPRQ, Transit(n=5), ka=ktr, Allometric, L2, IOV-MTT, FM ;; x1. Author: user $PROBLEM 3768 $INPUT ID ;ID DAT1=DROP ;Date TIME ;Clock time DV ;Dependent variable (logarithmic) AMT ;Dose amount (in nmol unit in this example) MDV ;Missing dependent variable (1=dose and concentrations below limit of quantification) EVID ;Event ID record CMT ;Compartment (1=dose,2=primaquine (PRQ),3=carboxyprimaquine (CPRQ)) COMED ;Co-administration (0=PRQ alone,1=PRQ with co-administered drugs) COMBI ;Co-administration (0=PRQ alone,1=PRQ with dihydroartemisinin/piperaquine, 2=PRQ with pyronaridine/artesunate, 3=PRQ with chloroquine) L2 ;NONMEM L2 data item BW ;Covariate body weight EURA ;Covariate co-administration (0=PRQ alone and PRQ with pyronaridine/artesunate or PRQ with chloroquine, 1=PRQ with dihydroartemisinin/piperaquine) PYRA ;Covariate co-administration (0=PRQ alone and PRQ with dihydroartemisinin/piperaquine or PRQ with chloroquine, 1=PRQ with pyronaridine/artesunate) CHLO ;Covariate co-administration (0=PRQ alone and PRQ with pyronaridine/artesunate or PRQ with dihydroartemisinin/piperaquine, 1=PRQ with chloroquine) $DATA Simulated_run1.csv ;Dose (nmol), CP (nmol/L) IGNORE=@ $SUBROUTINE ADVAN5 TRANS1 $MODEL COMP = (1) ;(DEPOT DOSE) COMP = (2) ;(CONCENTRATION PRQ) COMP = (3) ;(CONCENTRATION CPRQ) COMP = (4) ;(TRANSIT COMPARTMENT 1) COMP = (5) ;(TRANSIT COMPARTMENT 2) COMP = (6) ;(TRANSIT COMPARTMENT 3) COMP = (7) ;(TRANSIT COMPARTMENT 4) COMP = (8) ;(TRANSIT COMPARTMENT 5) $PK ;------------------------------------EURA covariate on V2----------------------------------------------------------------------------------- IF(EURA.EQ.0) V2EURA = 1 ; Most common IF(EURA.EQ.1) V2EURA = ( 1 + THETA(8)) ;------------------------------------------------------------------------------------------------------------------------------------------- ;------------------------------------PYRA covariate on V2----------------------------------------------------------------------------------- IF(PYRA.EQ.0) V2PYRA = 1 ; Most common IF(PYRA.EQ.1) V2PYRA = ( 1 + THETA(9)) ;------------------------------------------------------------------------------------------------------------------------------------------- ;------------------------------------CHLO covariate on V2----------------------------------------------------------------------------------- IF(CHLO.EQ.0) V2CHLO = 1 ; Most common IF(CHLO.EQ.1) V2CHLO = ( 1 + THETA(10)) ;------------------------------------------------------------------------------------------------------------------------------------------- V2COV=V2EURA*V2PYRA*V2CHLO ;------------------------------------PYRA covariate on CL ----------------------------------------------------------------------------------- IF(PYRA.EQ.0) CLPYRA = 1 ; Most common IF(PYRA.EQ.1) CLPYRA = ( 1 + THETA(11)) ;---------------------------------------------------------------------------------------------------------------------------------------- CLCOV=CLPYRA ;=============== Between-occasion variability ======================; OCC1 = 0 OCC2 = 0 IF(COMED.EQ.0) OCC1 = 1 IF(COMED.EQ.1) OCC2 = 1 BOVMT = ETA(8)*OCC1 + ETA(9)*OCC2 BOVFM = ETA(10)*OCC1 + ETA(11)*OCC2 ;===================================================================; TVMTT = THETA(1); ;Population mean absorption transit time MTT = TVMTT*EXP(ETA(1)+BOVMT); ;Individual mean absorption transit time with between-occasion variability TVCL = THETA(2); ;Population PRQ clearance TVCL = TVCL*CLCOV ;Population PRQ clearance and covariate effects CL = TVCL*EXP(ETA(2))*((BW/60)**0.75); ;Individual PRQ clearance, allometrically scaled by median body weight with a factor of 0.75 TVV2 = THETA(3); ;Population PRQ volume of distribution TVV2 = TVV2*V2COV ;Population PRQ volume of distribution and covariate effects V2 = TVV2*EXP(ETA(3))*(BW/60); ;Individual PRQ volume of distribution, allometrically scaled by median body weight with a factor of 1 TVCM = THETA(4); ;Population CPRQ clearance CM = TVCM*EXP(ETA(4))*((BW/60)**0.75); ;Individual CPRQ clearance, allometrically scaled by median body weight with a factor of 0.75 TVV3 = THETA(5); ;Population CPRQ volume of distribution V3 = TVV3*EXP(ETA(5))*(BW/60); ;Individual CPRQ volume of distribution, allometrically scaled by median body weight with a factor of 1 TVF1 = THETA(6); ;Population PRQ relative bioaviability F1 = TVF1*EXP(ETA(6)); ;Individual PRQ relative bioaviability TVFM = THETA(7) ;Population fraction of the absorbed oral PRQ converted into CPRQ during the first-pass hepatic metabolism TVPHI = LOG(TVFM/(1-TVFM)) PHI = TVPHI + ETA(7) + BOVFM FM = EXP(PHI)/(1+EXP(PHI)) ;Individual fraction of the absorbed oral PRQ converted into CPRQ during the first-pass hepatic metabolism NN = 5 ;Number of transit compartments KTR = (NN+1)/MTT ;Transit rate constant K14 = KTR K45 = KTR K56 = KTR K67 = KTR K78 = KTR K82 = KTR*(1-FM) K23 = CL/V2 K83 = KTR*FM K30 = CM/V3 S2 = V2 S3 = V3 $ERROR IF(CMT.EQ.2) IPRED = A(2)/S2 ;Predicted plasma concentration of PRQ IF(CMT.EQ.3) IPRED = A(3)/S3 ;Predicted plasma concentration of CPRQ IF(IPRED.GT.0) THEN IPRED = LOG(IPRED) ELSE IPRED = 0 ENDIF IF(CMT.EQ.2) THEN W = SQRT(SIGMA(1,1)) ;Additive residual error of PRQ on log scale Y = IPRED + EPS(1) ENDIF IF(CMT.EQ.3) THEN W = SQRT(SIGMA(2,2)) ;Additive residual error of CPRQ on log scale Y = IPRED + EPS(2) ENDIF IRES = DV-IPRED IWRES = IRES/W $THETA (0,0.895) ;1.TVMTT (0,15.9) ;2.TVCL (0,153) ;3.TVV2 (0,0.732) ;4.TVCM (0,16.6) ;5.TVV3 1 FIX ;6.TVF1 (0,0.363,1) ;7.TVFM $THETA (-1,-0.135,5) ; V2EURA1 $THETA (-1,-0.220,5) ; V2PYRA1 $THETA (-1,-0.120,5) ; V2CHLO1 $THETA (-1,-0.163,5) ; CLPYRA1 $OMEGA 0 FIX ;1.IIV MTT 0.0240 ;2.IIV CL 0.0234 ;3.IIV V2 0.0360 ;4.IIV CM 0 FIX ;5.IIV V3 0.0238 ;6.IIV F1 0 FIX ;7.IIV FM $OMEGA BLOCK(1) 0.20 ; BOV-MTT_OCC1 $OMEGA BLOCK(1) SAME $OMEGA BLOCK(1) 0.10 ; BOV-FM_OCC1 $OMEGA BLOCK(1) SAME $SIGMA BLOCK(2) 0.160 ;RUV PRQ 0.070 0.045 ;RUV CPRQ $EST MAXEVAL=0 PRINT=5 POSTHOC METHOD=1 INTER NOABORT NSIG=3 ;FOCE method with interaction $COV PRINT=E ;Print condition number $TABLE ID TIME COMBI DV AMT CMT MDV EVID MTT CL V2 CM V3 F1 FM W ETA1 ETA2 ETA3 ETA4 ETA5 ETA6 ETA7 IPRED PRED IRES IWRES CWRES NOPRINT ONEHEADER FILE=mytab1