From: Daniel Corrado 
Subject: [NMusers] DV simulation problem
Date:Thu, 5 Jun 2003 13:38:39 -0700 (PDT)

Since we have been discussing simulation
(reference to: 99may202003 and 99may292003), I was
wondering whether someone can help me with this:

When I do a simulation I get the DV values as well as
PRED values. The control file that I use defines

IPRED = DV-IRES

What I want to know is whether I should use DV or PRED
as my simulated values to generate a scatter plot and
95% CI.

PRED values gives a smooth curve while DV goes up and
down like a sawtooth.

Dan

******************************************
Data set

C       Data Desc: POPPK data
C       ID      TIME    DV      AMT
        1       0       .       200000
        1       0.25    0.85187 .
        1       0.5     1.126456        .
        1       1       1.024486        .
        1       1.5     1.400883        .
        1       2       1.527243        .
        1       2.5     1.440122        .
        1       3       1.338855        .
        1       4       1.196453        .
        1       6       0.893762        .
        1       8       0.737987        .
        1       10      0.596597        .
        1       12      0.451786        .
        1       16      0.133539        .
        1       23      .       .
        1       24      .       .


Control stream

;Model Desc: SIMULATION
;Project Name: SIM1
;Project ID: MR-001

$PROB RUN# 002 (POPULATION PK MODEL)
$INPUT C ID TIME DV AMT
$DATA  002.csv IGNORE C

$SUBROUTINES  ADVAN4 TRANS 4                          
                                                      
                                                      
                                                      
           

$PK
TVKA = THETA(1)
TVCL = THETA(2)
TVV2 = THETA(3)  
TVQ = THETA(4)
TVV3 = THETA(5)



KA=THETA(1)*EXP(ETA(1))
CL=THETA(2)*EXP(ETA(2))
V2=THETA(3)*EXP(ETA(3))
Q=THETA(4)*EXP(ETA(4))
V3=THETA(5)*EXP(ETA(5))

S2=V2                                                 
                                                      
                                  


$ERROR
DEL=0
IF (F.EQ.0) DEL=1
W=F
IPRED=F
IRES=DV-IPRED
IWRES=IRES/(W+DEL)
Y=F + ERR(1)

REPI=IREP 


$THETA
 (0.931 FIX)
 (29800 FIX)
 (304000 FIX)
 (0.147 FIX)
 (751 FIX)

  
$OMEGA
0.443 FIX;[P] INTERIND VAR IN KA
0.224 FIX;[P] INTERIND VAR IN CL
0.513 FIX;[P] INTERIND VAR IN V2
0.163 FIX;[P] INTERIND VAR IN Q
0.147 FIX;[P] INTERIND VAR IN V3


$SIGMA
0.0316 FIX ;[A] PROPORTIONAL COMPONENT


$SIMULATION (20030521) ONLYSIM   SUBPROBLEMS 5

$TABLE ID TIME DV REPI NOPRINT ONEHEADER FILE=002.TAB

******************************************************
Output

ID      TIME    DV      REPI    PRED
1.00    0.00    0.00    1.00    0.00
1.00    0.25    0.02    1.00    0.13
1.00    0.50    0.47    1.00    0.24
1.00    1.00    0.16    1.00    0.38
1.00    1.50    0.24    1.00    0.45
1.00    2.00    0.22    1.00    0.49
1.00    2.50    0.07    1.00    0.50
1.00    3.00    0.37    1.00    0.50
1.00    4.00    0.21    1.00    0.48
1.00    6.00    0.08    1.00    0.41
1.00    8.00    0.39    1.00    0.34
1.00    10.00   0.14    1.00    0.28
1.00    12.00   0.18    1.00    0.23
1.00    16.00   -0.06   1.00    0.15
1.00    23.00   0.31    1.00    0.08
1.00    24.00   0.33    1.00    0.07
TABLE NO.  1                            
ID      TIME    DV      REPI    PRED
1.00E+00        0.00E+00        0.00E+00        2.00E+00        0.00E+00
1.00E+00        2.50E-01        -8.04E-03       2.00E+00        1.35E-01
1.00E+00        5.00E-01        2.21E-01        2.00E+00        2.39E-01
1.00E+00        1.00E+00        5.13E-01        2.00E+00        3.77E-01
1.00E+00        1.50E+00        3.44E-01        2.00E+00        4.53E-01
1.00E+00        2.00E+00        6.82E-01        2.00E+00        4.90E-01
1.00E+00        2.50E+00        4.81E-01        2.00E+00        5.04E-01
1.00E+00        3.00E+00        9.11E-01        2.00E+00        5.03E-01
1.00E+00        4.00E+00        5.62E-01        2.00E+00        4.79E-01
1.00E+00        6.00E+00        4.48E-01        2.00E+00        4.06E-01
1.00E+00        8.00E+00        8.31E-01        2.00E+00        3.35E-01
1.00E+00        1.00E+01        8.08E-01        2.00E+00        2.76E-01
1.00E+00        1.20E+01        3.49E-01        2.00E+00        2.27E-01
1.00E+00        1.60E+01        7.62E-01        2.00E+00        1.53E-01
1.00E+00        2.30E+01        5.35E-01        2.00E+00        7.71E-02
1.00E+00        2.40E+01        4.98E-01        2.00E+00        6.99E-02
TABLE NO.  1                            
ID      TIME    DV      REPI    PRED
1.00E+00        0.00E+00        0.00E+00        3.00E+00        0.00E+00
1.00E+00        2.50E-01        -8.73E-02       3.00E+00        1.35E-01
1.00E+00        5.00E-01        1.45E-01        3.00E+00        2.39E-01
1.00E+00        1.00E+00        2.48E-01        3.00E+00        3.77E-01
1.00E+00        1.50E+00        2.59E-01        3.00E+00        4.53E-01
1.00E+00        2.00E+00        3.34E-01        3.00E+00        4.90E-01
1.00E+00        2.50E+00        2.42E-01        3.00E+00        5.04E-01
1.00E+00        3.00E+00        2.23E-01        3.00E+00        5.03E-01
1.00E+00        4.00E+00        4.03E-01        3.00E+00        4.79E-01
1.00E+00        6.00E+00        3.42E-01        3.00E+00        4.06E-01
1.00E+00        8.00E+00        3.50E-01        3.00E+00        3.35E-01
1.00E+00        1.00E+01        1.94E-01        3.00E+00        2.76E-01
1.00E+00        1.20E+01        1.96E-01        3.00E+00        2.27E-01
1.00E+00        1.60E+01        1.57E-01        3.00E+00        1.53E-01
1.00E+00        2.30E+01        -6.54E-02       3.00E+00        7.71E-02
1.00E+00        2.40E+01        1.36E-01        3.00E+00        6.99E-02
TABLE NO.  1                            
ID      TIME    DV      REPI    PRED
1.00E+00        0.00E+00        0.00E+00        4.00E+00        0.00E+00
1.00E+00        2.50E-01        6.93E-01        4.00E+00        1.35E-01
1.00E+00        5.00E-01        9.81E-01        4.00E+00        2.39E-01
1.00E+00        1.00E+00        8.69E-01        4.00E+00        3.77E-01
1.00E+00        1.50E+00        8.21E-01        4.00E+00        4.53E-01
1.00E+00        2.00E+00        5.95E-01        4.00E+00        4.90E-01
1.00E+00        2.50E+00        3.98E-01        4.00E+00        5.04E-01
1.00E+00        3.00E+00        7.15E-01        4.00E+00        5.03E-01
1.00E+00        4.00E+00        5.71E-01        4.00E+00        4.79E-01
1.00E+00        6.00E+00        2.33E-01        4.00E+00        4.06E-01
1.00E+00        8.00E+00        3.54E-01        4.00E+00        3.35E-01
1.00E+00        1.00E+01        -3.48E-02       4.00E+00        2.76E-01
1.00E+00        1.20E+01        -4.80E-02       4.00E+00        2.27E-01
1.00E+00        1.60E+01        5.05E-02        4.00E+00        1.53E-01
1.00E+00        2.30E+01        2.01E-01        4.00E+00        7.71E-02
1.00E+00        2.40E+01        -1.77E-01       4.00E+00        6.99E-02
TABLE NO.  1                            
ID      TIME    DV      REPI    PRED
1.00E+00        0.00E+00        0.00E+00        5.00E+00        0.00E+00
1.00E+00        2.50E-01        -2.26E-02       5.00E+00        1.35E-01
1.00E+00        5.00E-01        1.17E-01        5.00E+00        2.39E-01
1.00E+00        1.00E+00        -1.31E-01       5.00E+00        3.77E-01
1.00E+00        1.50E+00        2.05E-02        5.00E+00        4.53E-01
1.00E+00        2.00E+00        4.47E-01        5.00E+00        4.90E-01
1.00E+00        2.50E+00        -1.89E-01       5.00E+00        5.04E-01
1.00E+00        3.00E+00        1.78E-01        5.00E+00        5.03E-01
1.00E+00        4.00E+00        4.81E-02        5.00E+00        4.79E-01
1.00E+00        6.00E+00        1.37E-01        5.00E+00        4.06E-01
1.00E+00        8.00E+00        -2.55E-03       5.00E+00        3.35E-01
1.00E+00        1.00E+01        7.39E-02        5.00E+00        2.76E-01
1.00E+00        1.20E+01        1.45E-01        5.00E+00        2.27E-01
1.00E+00        1.60E+01        -4.69E-03       5.00E+00        1.53E-01
1.00E+00        2.30E+01        2.56E-01        5.00E+00        7.71E-02
1.00E+00        2.40E+01        -1.30E-01       5.00E+00        6.99E-02


_______________________________________________________

From:VPIOTROV@PRDBE.jnj.com
Subject:RE: [NMusers] DV simulation problem
Date:Fri, 6 Jun 2003 11:22:43 +0200

Dan,

When you simulate the model without fitting it back to simulated data sets
($SIM ONLY) PRED item in the table corresponds to population predictions
(determined by THETA and not affected by ETA and EPS). IPRE, if you define
it as IPRE=F, gives individual predictions (determined by THETA and ETA
(OMEGA), but not affected by EPS, i.e. noise free). DV is determined by
THETA, ETA (OMEGA) and EPS (SIGMA), and because of this is noisy. The bigger
is SIGMA the more pronounced is the noise.

Best regards,
Vladimir

-----------------------------------------------------------------

Vladimir Piotrovsky, Ph.D.
Research Fellow, Advanced PK-PD Modeling & Simulation
Global Clinical Pharmacokinetics and Clinical Pharmacology (ext. 5463/151)
Johnson & Johnson Pharmaceutical Research & Development
Turnhoutseweg 30 
B-2340 Beerse
Belgium

Tel: (+3214) 605463
Fax: (+3214) 605834
Email: vpiotrov@prdbe.jnj.com
_______________________________________________________

From:Toufigh Gordi 
Subject: RE: [NMusers] DV simulation problem
Date: Fri, 06 Jun 2003 11:03:54 -0400

Hi!

This might sound very trivial but am I correct to interpret this as the 
IPRED being the one that is "real", i.e. what concentrations the subjects 
really have, whereas DV will be what we observe when we measure the 
concentrations? Thus, when looking at the simulated data, one is more 
interested in IPRED than DV, correct?

T. Gordi
_______________________________________________________

From: Sriram Krishnaswam 
Subject: RE: [NMusers] DV simulation problem
Date: Sat, 7 Jun 2003 16:00:18 -0400


Hi,
I generally use DV but in order to avoid simulation of practically impossible
values (e.g negative concentration or >100% effect if simulated on a %
scale), I use things like CALL SIMETA(ETA), CALL SIMEPS(EPS), DOWHILE LOOPS,
Log transformation to avoid those impossible numbers. To me, it doesnt make
sense to simply ignore the estimated residual variability when it comes to
simulation. Among other unknown things, the res variance also contains
measurement error, which is not going to go away just because you are
simulating. Sometimes, if the residual variance is large, I try to do the
abbreviated predictive check playing with differnt residual variance
estimates and select one that "sufficiently" explains the observed data and
then use it for other simulations. Would be very interested to hear opinions
on this topic.

Sriram
Aventis, NJ
_______________________________________________________

From: VPIOTROV@PRDBE.jnj.com
Subject:  RE: [NMusers] DV simulation problem
Date:Sun, 8 Jun 2003 19:46:00 +0200

Toufigh,

As Sriram pointed out, if your goal is a predictive check, or if you are
interested in concentration prediction intervals (PI), you have to focus on
simulated DV, however, IPRE is also of interest as you may want to know
which part or PI comes from (estimated) interindividual variability, and
which is explained by residual variability. The latter may be surprisingly
high, as Sriram mentioned. It seems NONMEM tends to overestimate residual
variability, that becomes especially obvious in case of dense data. I am not
sure playing with the residual variance is a correct way to solve the
problem. I would try to use a sample variance that one can easily obtain
from (weighted) individual residuals. It is quite robust since is based on a
lot of observations (again if you have dense data).

Best regards,
Vladimir
_______________________________________________________

From:"Xiao, Alan" 
Subject: RE: [NMusers] DV simulation problem
Date:Mon, 09 Jun 2003 09:39:45 -0400

I think it depends on both data distribution and model structure you use
rather than NONMEM itself. I had rich experience of being able to obtain
very reasonable RV for dense data. After all, NONMEM is just a tool to solve
your equations for your model rather than a model itself. If your model can
fit data very well, RV will reasonably reflect what it should be.

Alan
_______________________________________________________