Not sure why would we need NPARAM there, is it necessary? I think one
can skip it.
On the different topic, expression for IWRES is not correct:
IWRES=IRES/(IPRED * EPS(1) + EPS(2))
This is the version that should be used:
IWRES=IRES/SQRT(IPRED**2 * SIGMA(1,1) + SIGMA(2,2))
Also it is more traditional to define IRES=DV-IPRED (negative residual
corresponds to over-predictions; observed=predicted + residual error).
Regards
Leonid
On 7/29/2019 2:49 PM, Paul Hutson wrote:
I’ve fixed it by increasing NPARAM until it worked (increasing to 7),
but can anyone explain why I get this message for a 3 compartment model
with additional compartments to output a time above a concentration
threshold (#4) and AUC while above that concentration threshold (#5)?
It appears that NONMEM wants additional parameters added to NPARAM when
I added calculated value CC in the $DES block. What is also odd to me
is that the fault is called on the line defining DADT(2). Thanks in
advance. Paul
$SUBROUTINES ADVAN6 TOL=3
$MODEL NCOMP=5 NPARAM=6
COMP=(CENTRAL DEFDOSE DEFOBS)
COMP=(TISU1)
COMP=(TISU2)
COMP=(TTIME)
COMP=(AUCC)
;------------------PK BLOCK
$PK
MIC=0.12 ; SEEKING TIME AND AUC ABOVE 0.12 MCG/ML
TVCL = POP_CL
TVV1=POP_V1
TVQ2=POP_Q2
TVV2=POP_V2
TVQ3=POP_Q3
TVV3=POP_V3
CL=TVCL * EXP(ETA(1))
V1=TVV1 * EXP(ETA(2))
Q2=TVQ2 * EXP(ETA(3))
V2=TVV2 * EXP(ETA(4))
Q3=TVQ3 * EXP(ETA(5))
V3=TVV3 * EXP(ETA(6))
K10=CL/V1
K12=Q2/V1
K21=Q2/V2
K13=Q3/V1
K31=Q3/V3
;--------------------DES BLOCK
$DES
CC=A(1)/V1
RT=0
IF(CC.GT.MIC) RT=1
DADT(1) = - A(1) * (K10 + K12 + K13) + A(2) * K21 + A(3)*K31
DADT(2) = A(1) * K12 - A(2) * K21
DADT(3) = A(1) * K13 - A(3) * K31
DADT(4)=RT ; TIME ABOVE THRESHOLD TAT
DADT(5)=RT*CC ; AUC ABOVE THRESHOLD AUCAT
;----------------- ERROR MODEL ----------------------------------
$ERROR
IPRED = F
IRES=IPRED-DV
Y=IPRED * (1 + EPS(1)) + EPS(2)
IWRES=IRES/(IPRED * EPS(1) + EPS(2))
TAT=A(4)
AUCAT=A(5)
TIS2 = A(2)/V2
TIS3 = A(3)/V3
Paul Hutson, PharmD, BCOP
Professor
UWisc School of Pharmacy
T: 608.263.2496
F: 608.265.5421