Thanks Bob,

Your explanation definitively sheds some light on those number differences.

Sebastien

Bob Leary wrote:

Both the BFGS optimization of the objective function in the $EST step and the inversion of the numerical

Hessian matrix in the $COV step involve a Cholesky decomposition of a (hopefully) positive definite matrix whose rows and columns correspond to the individual parameters. If the order of the parameters is changed, the rows and columns of the matrix being decomposed are permuted. The Cholesky decomposition is numerically sensitive to such permutations since no pivoting is done in the standard implementations. This sensitivity is particularly acute if the matrix is poorly conditioned or, even worse, indefinite. So indeed it is to be expected that changing the order of the parameters will affect the results. For well conditioned problems, this effect is minimal. But it is quite possible, for example, that an $EST or $COV step that fails with one ordering will succeed with another.

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

*From:* [email protected] [mailto:[email protected]] *On Behalf Of *Sebastien Bihorel
*Sent:* Wednesday, June 23, 2010 9:53 AM
*To:* Nick Holford
*Cc:* [email protected]
*Subject:* Re: [NMusers] Unexpected influence of parameter order on estimation results

I am aware of the issues associated numerical representation in computer memory but I must say that it is more than a bit surprising (disturbing) that the order of the parameters results in these pseudo-random outcomes in NONMEM computations. As far as I know, this is not the case in R, despite the same issues of numerical representation. That being said, I don't want to re-start the old debate on the value of the covariance step, but some people would consider that the two versions of my model gave significantly different results, simply based upon the objective function (at least a 10-point difference) and the (lack of) success of the covariance step.

Nick Holford wrote:

Welcome to the world of 'real' numbers i.e. the limited representation of numbers in computer arithmetic that leads to unexpected (pseudo-random) results.

Both versions of your model are giving the same answer. The apparent differences are due to pseudo-random chance.



[email protected] <mailto:[email protected]> wrote:

Dear NMusers,
I always thought that the order in which parameters are declared in the
control stream has no impact on the estimation outcomes, but the following
results seem to contradict this.
The PK of drug X was modeled with a linear 3-compartment model using a
proportional residual variability model. Inter-individual variability was
estimated on elimination clearance and central volume of distribution. The
magnitude of residual variability was estimated using a THETA and a SIGMA
fixed to 1 as follows:
$ERROR
IPRED=F
CV=THETA(x)
W=CV*IPRED
Y=IPRED+W*EPS(1)
Two versions of this model were created with slight differences in the
order of declaration of the theta parameters: the theta used to estimate
the RV was basically moved from the third to the last position and the $PK
and the $ERROR blocks were updated accordingly.
Both models were run with NONMEM 6.2.0 on opensuse 11.1 (with the gfortran
compiler). One of the models converged successfully while the other
stopped at an early iteration and returned some estimation warnings and a
'S matrix singular' message. The strange thing is that gradients appears
identical until the 10th iteration, at which point the two models take
different search paths (see below).
I would be very interested to know the opinion of the group on this
puzzling result.
Thanks Sebastien -----------------------------------------------------------------------------------
Model 1 (RV theta in the 1st position)
1
 MONITORING OF SEARCH:
0ITERATION NO.: 0 OBJECTIVE VALUE: 0.25863E+04 NO. OF FUNC.
EVALS.: 9
 CUMULATIVE NO. OF FUNC. EVALS.:        9
PARAMETER: 0.1000E+00 0.1000E+00 0.1000E+00 0.1000E+00 0.1000E+00 0.1000E+00
0.1000E+00  0.1000E+00  0.1000E+00
GRADIENT: -0.9523E+02 0.3303E+03 -0.2730E+04 0.6103E+03 -0.1044E+04 0.2780E+03
-0.6146E+03 -0.9406E+02 -0.3231E+03
0ITERATION NO.:    5    OBJECTIVE VALUE:  0.10396E+04    NO. OF FUNC.
EVALS.:10
 CUMULATIVE NO. OF FUNC. EVALS.:       59
 PARAMETER:  0.1919E+01 -0.5699E+00  0.4872E+00 -0.1661E+01  0.1040E+01
-0.3113E+00
-0.8783E-01  0.1274E+01 -0.6898E-01
 GRADIENT:   0.1511E+02 -0.2036E+02 -0.3532E+03 -0.3176E+02 -0.4009E+02
-0.9733E+02
0.4026E+02 -0.2917E+02 -0.4199E+02
0ITERATION NO.:   10    OBJECTIVE VALUE:  0.88163E+03    NO. OF FUNC.
EVALS.:12
 CUMULATIVE NO. OF FUNC. EVALS.:      127
PARAMETER: 0.1643E+01 -0.4360E+00 0.9125E+00 -0.1429E+01 0.1009E+01 0.2690E+00
0.1835E+00  0.1894E+01 -0.3302E+00
 GRADIENT:   0.7310E+01  0.2031E+02 -0.3379E+02  0.1896E+02 -0.6428E+02
-0.5519E+01
0.2288E+02  0.8420E+01 -0.3893E+02
0ITERATION NO.:   15    OBJECTIVE VALUE:  0.85825E+03    NO. OF FUNC.
EVALS.:10
 CUMULATIVE NO. OF FUNC. EVALS.:      179
 PARAMETER:  0.7899E+00 -0.5002E+00  0.1014E+01 -0.1314E+01  0.1104E+01
-0.4181E-01
-0.2654E+00  0.1545E+01  0.3062E+00
 GRADIENT:   0.8389E+01  0.8285E+01  0.5404E+01  0.2172E+02 -0.9433E+01
-0.2633E+02
0.7059E+01  0.2790E+01 -0.1023E+01
0ITERATION NO.:   20    OBJECTIVE VALUE:  0.85807E+03    NO. OF FUNC.
EVALS.:10
 CUMULATIVE NO. OF FUNC. EVALS.:      275
 PARAMETER:  0.7816E+00 -0.5006E+00  0.1013E+01 -0.1314E+01  0.1104E+01
-0.4133E-01
-0.2649E+00  0.1477E+01  0.3305E+00
 GRADIENT:   0.9405E+01  0.7846E+01  0.5605E+01  0.2021E+02 -0.9587E+01
-0.2640E+02
0.6285E+01  0.2135E-01 -0.1198E-02
0ITERATION NO.:   25    OBJECTIVE VALUE:  0.84968E+03    NO. OF FUNC.
EVALS.:10
 CUMULATIVE NO. OF FUNC. EVALS.:      344
PARAMETER: -0.2358E+00 -0.5888E+00 0.1008E+01 -0.1312E+01 0.1114E+01 0.8588E-01
-0.2390E+00  0.9860E+00  0.3144E+00
 GRADIENT:  -0.2043E+01 -0.4198E+01 -0.1418E+00  0.1786E+02  0.1856E+00
-0.2873E+01
-0.6265E+01  0.8535E+00 -0.2022E+00
0ITERATION NO.:   30    OBJECTIVE VALUE:  0.84767E+03    NO. OF FUNC.
EVALS.:10
 CUMULATIVE NO. OF FUNC. EVALS.:      396
PARAMETER: -0.9020E-02 -0.5500E+00 0.1022E+01 -0.1312E+01 0.1258E+01 0.3517E+00
0.7877E-01  0.9016E+00  0.3574E+00
 GRADIENT:  -0.1566E+00 -0.1616E+00 -0.3990E+00  0.2010E+02  0.5696E+00
-0.5633E+00
0.4708E+00 -0.3923E+00  0.1648E-01
0ITERATION NO.:   35    OBJECTIVE VALUE:  0.84766E+03    NO. OF FUNC.
EVALS.:17
 CUMULATIVE NO. OF FUNC. EVALS.:      469
PARAMETER: -0.2786E-02 -0.5413E+00 0.1025E+01 -0.1312E+01 0.1252E+01 0.3551E+00
0.7957E-01  0.9105E+00  0.3546E+00
 GRADIENT:  -0.1860E-02  0.2683E-01 -0.1566E-01  0.1869E+02  0.3775E-02
-0.6239E-02
0.5749E-02  0.1541E-01 -0.6128E-03
0ITERATION NO.:   40    OBJECTIVE VALUE:  0.84590E+03    NO. OF FUNC.
EVALS.:17
 CUMULATIVE NO. OF FUNC. EVALS.:      568
PARAMETER: -0.1454E+00 -0.5904E+00 0.9921E+00 -0.1483E+01 0.1287E+01 0.2158E+00
0.8236E-01  0.9660E+00  0.3228E+00
 GRADIENT:  -0.7465E-01 -0.3447E+00 -0.4737E+00  0.2200E+01  0.2029E+01
-0.1106E+01
-0.5923E+00 -0.8064E-01  0.1356E+00
0ITERATION NO.:   45    OBJECTIVE VALUE:  0.84585E+03    NO. OF FUNC.
EVALS.:14
 CUMULATIVE NO. OF FUNC. EVALS.:      650
PARAMETER: -0.1440E+00 -0.5825E+00 0.9933E+00 -0.1493E+01 0.1261E+01 0.2183E+00
0.8561E-01  0.9659E+00  0.3136E+00
GRADIENT: -0.5281E-04 -0.5273E-03 0.1878E-03 -0.9052E-03 0.1615E-03 0.1004E-02
-0.8575E-03 -0.1004E-03 -0.1273E-03
0MINIMIZATION SUCCESSFUL
 NO. OF FUNCTION EVALUATIONS USED:      650
 NO. OF SIG. DIGITS IN FINAL EST.:  4.7
ETABAR IS THE ARITHMETIC MEAN OF THE ETA-ESTIMATES,
 AND THE P-VALUE IS GIVEN FOR THE NULL HYPOTHESIS THAT THE TRUE MEAN IS 0.
ETABAR: -0.46E-02 0.39E-02 0.00E+00 0.00E+00 0.00E+00 0.00E+00 0.00E+00 SE: 0.21E+00 0.91E-01 0.00E+00 0.00E+00 0.00E+00 0.00E+00 0.00E+00 P VAL.: 0.98E+00 0.97E+00 0.10E+01 0.10E+01 0.10E+01 0.10E+01 0.10E+01 ----------------------------------------------------------------------------------
Model 2 (RV theta in the 7th position)
1
 MONITORING OF SEARCH:
0ITERATION NO.: 0 OBJECTIVE VALUE: 0.25863E+04 NO. OF FUNC.
EVALS.: 9
 CUMULATIVE NO. OF FUNC. EVALS.:        9
PARAMETER: 0.1000E+00 0.1000E+00 0.1000E+00 0.1000E+00 0.1000E+00 0.1000E+00
0.1000E+00  0.1000E+00  0.1000E+00
 GRADIENT:  -0.9523E+02  0.3303E+03  0.6103E+03 -0.1044E+04  0.2780E+03
-0.6146E+03
-0.2730E+04 -0.9406E+02 -0.3231E+03
0ITERATION NO.:    5    OBJECTIVE VALUE:  0.10396E+04    NO. OF FUNC.
EVALS.:10
 CUMULATIVE NO. OF FUNC. EVALS.:       59
 PARAMETER:  0.1919E+01 -0.5699E+00 -0.1661E+01  0.1040E+01 -0.3113E+00
-0.8783E-01
0.4872E+00  0.1274E+01 -0.6898E-01
GRADIENT: 0.1511E+02 -0.2036E+02 -0.3176E+02 -0.4009E+02 -0.9733E+02 0.4026E+02
-0.3532E+03 -0.2917E+02 -0.4199E+02
0ITERATION NO.:   10    OBJECTIVE VALUE:  0.88167E+03    NO. OF FUNC.
EVALS.:12
 CUMULATIVE NO. OF FUNC. EVALS.:      127
PARAMETER: 0.1642E+01 -0.4358E+00 -0.1429E+01 0.1009E+01 0.2691E+00 0.1839E+00
0.9126E+00  0.1895E+01 -0.3306E+00
GRADIENT: 0.7304E+01 0.2046E+02 0.1895E+02 -0.6432E+02 -0.5543E+01 0.2291E+02
-0.3381E+02  0.8433E+01 -0.3897E+02
0ITERATION NO.:   15    OBJECTIVE VALUE:  0.85827E+03    NO. OF FUNC.
EVALS.:10
 CUMULATIVE NO. OF FUNC. EVALS.:      179
 PARAMETER:  0.8105E+00 -0.5381E+00 -0.1334E+01  0.1062E+01 -0.1712E-02
-0.2072E+00
0.1000E+01  0.1570E+01  0.2716E+00
GRADIENT: 0.8146E+01 -0.2087E+01 0.2338E+02 -0.2616E+02 -0.2205E+02 0.1064E+02
0.4212E+01  0.3944E+01 -0.2221E+01
0ITERATION NO.:   20    OBJECTIVE VALUE:  0.85775E+03    NO. OF FUNC.
EVALS.:39
 CUMULATIVE NO. OF FUNC. EVALS.:      317             RESET HESSIAN, TYPE I
 PARAMETER:  0.7924E+00 -0.5386E+00 -0.1335E+01  0.1073E+01 -0.2161E-02
-0.2085E+00
0.1001E+01  0.1558E+01  0.2793E+00
GRADIENT: 0.8121E+01 -0.1709E+01 0.2187E+02 -0.2257E+02 -0.2142E+02 0.9023E+01
0.4553E+01  0.3690E+01 -0.1895E+01
0ITERATION NO.:   24    OBJECTIVE VALUE:  0.85768E+03    NO. OF FUNC.
EVALS.:24
 CUMULATIVE NO. OF FUNC. EVALS.:      386
 PARAMETER:  0.7924E+00 -0.5386E+00 -0.1335E+01  0.1076E+01 -0.2161E-02
-0.2085E+00
0.1001E+01  0.1556E+01  0.2805E+00
 GRADIENT:  -0.7820E+04 -0.5761E+04 -0.4623E+04  0.5748E+04  0.6202E+05
-0.2974E+05
0.3099E+04  0.1998E+04  0.2212E+05
0MINIMIZATION SUCCESSFUL
 HOWEVER, PROBLEMS OCCURRED WITH THE MINIMIZATION.
 REGARD THE RESULTS OF THE ESTIMATION STEP CAREFULLY, AND ACCEPT THEM ONLY
 AFTER CHECKING THAT THE COVARIANCE STEP PRODUCES REASONABLE OUTPUT.
 NO. OF FUNCTION EVALUATIONS USED:      386
 NO. OF SIG. DIGITS IN FINAL EST.:  3.3
ETABAR IS THE ARITHMETIC MEAN OF THE ETA-ESTIMATES,
 AND THE P-VALUE IS GIVEN FOR THE NULL HYPOTHESIS THAT THE TRUE MEAN IS 0.
ETABAR: -0.61E+00 0.15E-01 0.00E+00 0.00E+00 0.00E+00 0.00E+00 0.00E+00 SE: 0.31E+00 0.92E-01 0.00E+00 0.00E+00 0.00E+00 0.00E+00 0.00E+00 P VAL.: 0.48E-01 0.87E+00 0.10E+01 0.10E+01 0.10E+01 0.10E+01 0.10E+01
0S MATRIX ALGORITHMICALLY SINGULAR
0S MATRIX IS OUTPUT
0INVERSE COVARIANCE MATRIX SET TO RS*R, WHERE S* IS A PSEUDO INVERSE OF S


--
Nick Holford, Professor Clinical Pharmacology
Dept Pharmacology & Clinical Pharmacology
University of Auckland,85 Park Rd,Private Bag 92019,Auckland,New Zealand
tel:+64(9)923-6730 fax:+64(9)373-7090 mobile:+64(21)46 23 53
email: [email protected] <mailto:[email protected]>
http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford
_________________________________________________________________
NOTICE: The information contained in this electronic mail message is intended 
only for the personal and confidential use of the designated recipient(s) named 
above. This message may be an attorney-client communication, may be protected 
by the work product doctrine, and may be subject to a protective order. As 
such, this message is privileged and confidential. If the reader of this 
message is not the intended recipient or an agent responsible for delivering it 
to the intended recipient, you are hereby notified that you have received this 
message in error and that any review, dissemination, distribution, or copying 
of this message is strictly prohibited. If you have received this communication 
in error, please notify us immediately by telephone and e-mail and destroy any 
and all copies of this message in your possession (whether hard copies or 
electronically stored copies). Thank you.


Reply via email to