```From: musor000@optonline.net
Date: 2/13/2004 11:21 PM

Hi, NONMEM users,

I tried to fit a simple one compartment model with first order absorbtion.
First, I used ADVAN2 and TRANS1.  The model converged well.  Second, I used
(K=0.0776, V=0.481, Ka=2.79).  Then I looked at plots and residuals and realized
that the results are very biased:
1.  Means of residuals are very far from zero;
2.  Plots of residuals and dependent variable vs time look quite different.

I canot fix the problem.

Can you identify the problem?  Here are codes and data:

\$PROBLEM  FIRST ADVAN2 -- POPULATION DATA
\$INPUT      ID TIME CP=DV DOSE=AMT MDV
\$DATA       A2IN2

\$PK
;THETA(1)=MEAN ELIMINATION RATE CONSTANT K (1/HR)
;THETA(2)=VOLUME OF DISTRIBUTION
;THETA(3)=MEAN ABSORPTION RATE CONSTANT KA (1/HR)
CALLFL=1
K=THETA(1)+ETA(1)
KA=THETA(2)+ETA(2)   ;ETA(1) - INTERINDIVIDUAL VARIABILITY OF KA (NU)
S2= THETA(3)+ETA(3)
;CL=K*V;

\$THETA (.001,.7,5)  (.001,1,10)  (.001,0.3,20)
\$OMEGA BLOCK(3)  .1   .0001 .01   .0001 .0001 .1   ;VARIANCE OF ETA

\$ERROR
Y=F+EPS(1)

\$SIGMA  .3                              ;VARIANCE OF EPS

\$EST     MAXEVAL=450  PRINT=5
\$COV                                    ;COVARIANCE STEP IS IMPLEMENTED
\$TABLE          ID TIME DOSE PRED DV
\$SCAT           (DV PRED) VS TIME BY ID

********************************************
\$PROB  REPLICATE OF ADVAN2 USING DIFF EQUATIONS-- POPULATION DATA
\$INPUT      ID TIME CP=DV DOSE=AMT
\$DATA       A2IN2
\$SUBROUTINES  ADVAN6  TOL=7    ;TOL - THE NUMBER OF ACCURATE DIGITS
\$MODEL COMP=(DEPOT,DEFDOSE) COMP=(CENTRAL,DEFOBS,NOOFF)
\$PK
;THETA(1)=MEAN ELIMINATION RATE CONSTANT K (1/HR) = 0.076
;THETA(2)=VOLUME OF DISTRIBUTION                  = 0.481
;THETA(3)=MEAN ABSORPTION RATE CONSTANT KA (1/HR) = 2.790
CALLFL=1
K= THETA(1)+ETA(1)
V= THETA(2)+ETA(2)
KA=THETA(3)+ETA(3)   ;ETA(1) - INTERINDIVIDUAL VARIABILITY OF KA (NU)
;CL=K*V
\$THETA  (.001,.1,5) (.001,.5,20) (.001,3,10)
\$OMEGA BLOCK(3)  .1   .0001 .01   .0001 .0001 .1  ;VARIANCE OF ETA
\$DES
\$ERROR
Y=F+EPS(1)

\$SIGMA  .3                                    ;VARIANCE OF EPS

\$EST     MAXEVAL=450  PRINT=5
\$COV                          ;COVARIANCE STEP IS IMPLEMENTED
\$TABLE          ID TIME DOSE PRED ETA1 ETA2 ETA3
\$SCAT           (DV PRED) VS TIME BY ID

*********************************************
1        0.00      .         4.02      1
1        0.00      0.74      .         0
1        0.25      2.84      .         0
1        0.57      6.57      .         0
1        1.12      10.50     .         0
1        2.02      9.66      .         0
1        3.82      8.58      .         0
1        5.10      8.36      .         0
1        7.03      7.47      .         0
1        9.05      6.89      .         0
1        12.12     5.94      .         0
1        24.37     3.28      .         0
2        0.00      .         4.40      1
2        0.00      0.00      .         0
2        0.27      1.72      .         0
2        0.52      7.91      .         0
2        1.00      8.31      .         0
2        1.92      8.33      .         0
2        3.50      6.85      .         0
2        5.02      6.08      .         0
2        7.03      5.40      .         0
2        9.00      4.55      .         0
2        12.00     3.01      .         0
2        24.30     0.90      .         0
3        0.00      .         4.53      1
3        0.00      0.00      .         0
3        0.27      4.40      .         0
3        0.58      6.90      .         0
3        1.02      8.20      .         0
3        2.02      7.80      .         0
3        3.62      7.50      .         0
3        5.08      6.20      .         0
3        7.07      5.30      .         0
3        9.00      4.90      .         0
3        12.15     3.70      .         0
3        24.17     1.05      .         0
4        0.00      .         4.40      1
4        0.00      0.00      .         0
4        0.35      1.89      .         0
4        0.60      4.60      .         0
4        1.07      8.60      .         0
4        2.13      8.38      .         0
4        3.50      7.54      .         0
4        5.02      6.88      .         0
4        7.02      5.78      .         0
4        9.02      5.33      .         0
4        11.98     4.19      .         0
4        24.65     1.15      .         0
5        0.00      .         5.86      1
5        0.00      0.00      .         0
5        0.30      2.02      .         0
5        0.52      5.63      .         0
5        1.00      11.40     .         0
5        2.02      9.33      .         0
5        3.50      8.74      .         0
5        5.02      7.56      .         0
5        7.02      7.09      .         0
5        9.10      5.90      .         0
5        12.00     4.37      .         0
5        24.35     1.57      .         0
6        0.00      .         4.00      1
6        0.00      0.00      .         0
6        0.27      1.29      .         0
6        0.58      3.08      .         0
6        1.15      6.44      .         0
6        2.03      6.32      .         0
6        3.57      5.53      .         0
6        5.00      4.94      .         0
6        7.00      4.02      .         0
6        9.22      3.46      .         0
6        12.10     2.78      .         0
6        23.85     0.92      .         0
7        0.00      .         4.95      1
7        0.00      0.15      .         0
7        0.25      0.85      .         0
7        0.50      2.35      .         0
7        1.02      5.02      .         0
7        2.02      6.58      .         0
7        3.48      7.09      .         0
7        5.00      6.66      .         0
7        6.98      5.25      .         0
7        9.00      4.39      .         0
7        12.05     3.53      .         0
7        24.22     1.15      .         0
8        0.00      .         4.53      1
8        0.00      0.00      .         0
8        0.25      3.05      .         0
8        0.52      3.05      .         0
8        0.98      7.31      .         0
8        2.02      7.56      .         0
8        3.53      6.59      .         0
8        5.05      5.88      .         0
8        7.15      4.73      .         0
8        9.07      4.57      .         0
8        12.10     3.00      .         0
8        24.12     1.25      .         0
9        0.00      .         3.10      1
9        0.00      0.00      .         0
9        0.30      7.37      .         0
9        0.63      9.03      .         0
9        1.05      7.14      .         0
9        2.02      6.33      .         0
9        3.53      5.66      .         0
9        5.02      5.67      .         0
9        7.17      4.24      .         0
9        8.80      4.11      .         0
9        11.60     3.16      .         0
9        24.43     1.12      .         0
10       0.00      .         5.50      1
10       0.00      0.24      .         0
10       0.37      2.89      .         0
10       0.77      5.22      .         0
10       1.02      6.41      .         0
10       2.05      7.83      .         0
10       3.55      10.21     .         0
10       5.05      9.18      .         0
10       7.08      8.02      .         0
10       9.38      7.14      .         0
10       12.10     5.68      .         0
10       23.70     2.42      .         0
11       0.00      .         4.92      1
11       0.00      0.00      .         0
11       0.25      4.86      .         0
11       0.50      7.24      .         0
11       0.98      8.00      .         0
11       1.98      6.81      .         0
11       3.60      5.87      .         0
11       5.02      5.22      .         0
11       7.03      4.45      .         0
11       9.03      3.62      .         0
11       12.12     2.69      .         0
11       24.08     0.86      .         0
12       0.00      .         5.30      1
12       0.00      0.00      .         0
12       0.25      1.25      .         0
12       0.50      3.96      .         0
12       1.00      7.82      .         0
12       2.00      9.72      .         0
12       3.52      9.75      .         0
12       5.07      8.57      .         0
12       7.07      6.59      .         0
12       9.03      6.11      .         0
12       12.05     4.57      .         0
12       24.15     1.17      .         0

_______________________________________________________

From: Nick Holford - n.holford@auckland.ac.nz
Date: 2/14/2004 2:15 AM

Hi,

out of function evaluations.

You can get it to converge and run the \$COV step if you
allow more function evalutions and tweak your initial estimates a bit.

I can't see any problem when I look at graphs of your fit.

THETA:      K           KA          V
ETA:        PPVK        PPVKA       PPVV
ERR:        SD
advan2.lst	101.072	eval=122 sig=+3.4 sub=12 obs=132 CCIL=NNNN NV1.1 PIV1.1
THETA     = 0.0809      2.82        0.481
ETASD     = 0.0181384   2.49199     0.070214
ETAR12    = 0.241
ETAR23    = 0.159 -0.213
ERRSD     = 0.618061
THETA:se% = 11.4        25.0        4.8
OMEGA:se% = 81.8        85.3        37.9
SIGMA:se% = 26.0

\$PROBLEM  FIRST ADVAN2 -- POPULATION DATA
\$INPUT      ID TIME CP=DV DOSE=AMT MDV
\$DATA A2IN2.dat IGNORE #
\$EST     MAXEVAL=9990 SIG=3 PRINT=0
POSTHOC
\$COV

\$THETA
(.001,0.0806,5) ;K
(.001,2.81,10) ;KA
(.001,0.481,20) ;V

\$OMEGA BLOCK(3)
0.00032 ;PPVK
0.0104 6.2 ;PPVKA
0.00021 -0.0369 0.00492 ;PPVV

\$SIGMA 0.382 ;SD

\$PK
CALLFL=1
K=THETA(1)+ETA(1)
KA=THETA(2)+ETA(2)
V=THETA(3)+ETA(3)
S2=V

\$ERROR
CONC=F
Y=CONC+ERR(1)

\$TABLE ID TIME DOSE Y