Hi Matthew,

It looks like you're going to some rather extreme efforts to achieve your goal, 
and dependent on your assay, having negative CP values may not be wrong.

For the negative CP values, usually a PK assay has a component of both additive 
and either proportional or exponential error from the basal noise in the 
measurement (additive) and the layering of that noise with the integration 
routine (proportional/exponential).  When your assay has a low LOQ and/or you 
are simulating to times below that LOQ, your simulation can have random error 
(via additive EPS) that will go negative.  This is normal and to be expected.  
There are a few ways to manage this, though I've not seen the method of 
attempting to ensure that the value is ≤3 stdev from the mean before.

A more typical method of handing it would be like:

IIVCL=ETA(1)
IF (IIVCL .LE. -0.594) IIVCL=-0.594
IF (IIVCL .GE. 0.594) IIVCL=0.594

Though, usually a well-defined ETA standard deviation should not need to be 
truncated.  (Sometimes with PD it is required-especially with questionnaires 
but with PK it is not very common.)  Needing to truncate this may be a sign 
that additional model evaluation (especially around the shrinkage of your etas) 
should be considered.

For LOQ questions, I more commonly handle this during post-processing by 
flagging simulated values as BLQ if they are below the assay LOQ and then using 
that in the plotting (e.g. for plotting show them as 0.5*LOQ and compare the 
percentage of simulated vs. observed values with a given dose/treatment/regimen 
at a time point that are BLQ as one of the simulation goodness-of-fit 
evaluations.

Thanks,

Bill

From: [email protected] [mailto:[email protected]] On 
Behalf Of Matthew Hui
Sent: Monday, April 07, 2014 4:39 AM
To: NONMEM user network (for question and remarks)
Subject: [NMusers] Simulation returns negative CP values

Dear all,

I just finished building my model and I am going onto the simulation.

However I constantly generated some negative CP values without being able to 
identify the underlying problem.

Here is my control stream:


$SUBROUTINE ADVAN2 TRANS1

$PK
;ETA SIMULATION - LIMIT TO 3*SD
IF (ICALL.EQ.4.AND.NEWIND.NE.2) THEN
    DO WHILE (ABS(ETA(1)).GT.0.594)         ; 0.594 = SQRT(0.0392)*3
            CALL SIMETA(ETA)
    ENDDO
ENDIF
;CLEARANCE
        TVCL=THETA(1)
        
CL=TVCL*(1+(THETA(5)*LOG(CYP2B6+1)))*(1+(THETA(4)*((WT/63.5)-1)))*(1+ETA(1))
;VOLUME OF DISTRIBUTION
        TVVD=THETA(2)
        V=TVVD
        S2=V
;REQUIRED CONSTANT
        K=CL/V
        KA=THETA(3)
REPI=IREP

$THETA
2.51 ; THETA(1)
200 ; THETA(2)
0.445 ; THETA(3) FIXED
0.368 ; THETA(4)
2.88 ; THETA(5)

$ERROR
IF (ICALL.EQ.4.AND.NEWIND.NE.2) THEN
        DO WHILE (ABS(EPS(1)).GT.0.863)          ; 0.863 = SQRT(0.0827)*3
                CALL SIMEPS(EPS)
        ENDDO
ENDIF
Y=F*(1+EPS(1))

$OMEGA
0.0392

$SIGMA
0.0827

$SIMULATION (2315625 NORMAL NEW) SUBPROBLEMS=10


I wonder if that was due to some ETA(1) or EPS(1) less than -1 being generated. 
But I thought I had already used the whileloop to avoid this from happening.

Thanks in advance,
matthew

Reply via email to