# RE: var-cov matrix issue?

From: Bob Leary <bleary>
Date: Wed, 25 Feb 2009 14:08:37 -0500

Hi Ethan, that's possible if the S matrix is 'algorithmically' singular =
but not exactly singular.
In this case the pseudoinverse is not a continuous function of the =
elements of the matrix.
For example, consider a 2 by 2 matrix with
a11=1, a22=eps, and a12=a21=0, where eps is equal to a very =
small number.

The true inverse (and pseudoinverse) is ainv11=1, ainv22=1/eps, =
ainv12,ainv21=0. At eps=0,
the pseudoinverse of A is ainv11=1, ainv22=0, a very different =
result than for any arbitrarily small but still positive eps.

For example, in MATLAB (which uses state of the art routines),
for eps=1.d-15 , pinv(A), the pseudoinverse of A, is exactly and =
correctly computed as
a11=1., a22 = 1.d15. But at eps=1.d-20, pinv(A) is computed as =
ainv11=1, ainv22=0,
the same result as if eps=0. So somewhere between eps=1.d-15 and =
1.d-20 (which is right around
the relative precision of double precision computations), the result =
returned by the pseudoinverse changes from
positive definite to not positive definite (interstingly, inv(A), the =
matlab matrix inverse routine, still
returns the exactly correct results for eps=1.d-20). If the criterion =
that NM uses to determing 'algorithmic singularity'is a high condition =
number estimate that is set to something like 1.d10, and the true =
conditon number of S is around 1.d15, then a good pseudoinverse routine =
returns a positive definite matrix but NM decides
(probably quite justifiably) that the original S matrix is =
'algorithmically' singular.

Robert H. Leary, PhD
Fellow

Pharsight - A Certara(tm) Company
5625 Dillard Dr., Suite 205
Cary, NC 27511

Phone/Voice Mail: (919) 852-4625, Fax: (919) 859-6871
Email: bleary

This email message (including any attachments) is for the sole use of =
the intended recipient and may contain confidential and proprietary =
information. Any disclosure or distribution to third parties that is =
not specifically authorized by the sender is prohibited. If you are not =
destroy all copies of the original message.

-----Original Message-----
From: Ethan Wu [mailto:ethan.wu75
Sent: Wednesday, February 25, 2009 12:49 PM
To: Bob Leary; nmusers
Subject: Re: [NMusers] var-cov matrix issue?

Hi Bob, I don't have enough math to understand difference of those =
matrix, but, the final matrix output from nonmem was positive definite =
in my case

_____

From: Bob Leary <bleary
To: nmusers
Sent: Wednesday, February 25, 2009 8:33:53 AM
Subject: RE: [NMusers] var-cov matrix issue?

If S is singular, then the 'covariance' matrix Rinv * S * Rinv is also =
singular,
as is the 'inverse coveriance matrix' R*Spseudoinv*R (the eigenvalues =
of
Spseudoinv for the usual Moore Penrose pseudoinverse are the inverse of =
the eigenvalues of S, except where the S has a zero eigenvalue, in which =
case the corresponding eigenvalue of Spseudoinv is also zero. The =
eigenvectors are the same for S and Spseudoinv). Thus none of these =
quantities is really directly suitable for
use in simulation if positive definiteness is a requirement.

Robert H. Leary, PhD
Fellow

Pharsight - A Certara(tm) Company
5625 Dillard Dr., Suite 205
Cary, NC 27511

Phone/Voice Mail: (919) 852-4625, Fax: (919) 859-6871
Email: bleary

> This email message (including any attachments) is for the sole use of =
the intended recipient and may contain confidential and proprietary =
information. Any disclosure or distribution to third parties that is =
not specifically authorized by the sender is prohibited. If you are not =
destroy all copies of the original message.

-----Original Message-----
From: owner-nmusers
[mailto: owner-nmusers
Sent: Tuesday, February 24, 2009 15:59 PM
To: Bachman, William
Cc: Ethan Wu; justin.wilkins
Subject: Re: [NMusers] var-cov matrix issue?

According to the manual, covariance matrix IS calculated by the default
method (Rinv S Rinv) even when S is singular but the inverse covariance
matrix (R Sinv R) cannot be computed as usual since S is singular (see
below). From the same manual "An error message stating that the S matrix =

is singular indicates strong overparameterization". If some of your
OMEGAs are estimated with large error, I would try to remove those ETAs
from the model. Scatter plot matrix of ETAs vs ETAs could be helpful: if =

some of your ETAs are redundant, you could see strong correlation of the =

ETAs estimates.

--
The inverse variance-covariance matrix R*Sinv*R is also output
(labeled as the Inverse Covariance Matrix), where Sinv is the inverse
of the S matrix. If S is judged to be singular, a pseudo-inverse of S
is used, and since a pseudo-inverse is not unique, the inverse
variance-covariance matrix is really not unique. In either case, the
inverse variance-covariance matrix can be used to develop a joint con-
fidence region for the complete set of population parameters. As we
usually develop a confidence region for a very limited set of popula-
tion parameters, this use of the inverse variance-covariance matrix is
somewhat limited.

--
--------------------------------------
Leonid Gibiansky, Ph.D.
President, QuantPharm LLC
web: www.quantpharm.com <http://www.quantpharm.com/>
e-mail: LGibiansky at quantpharm.com <http://quantpharm.com/>
tel: (301) 767 5566

Bachman, William wrote:
> As a clarification, this is not an error. It is an indication of a
> numerical condition generated by the matrix algebra. it says that the =

> covariance could not be calculated by the default method (possibly due =

> to ill conditioning) so it was calculated by an alternative method. =
You
> could generate standard errors by an alternative method, e.g. =
bootstrap,
> and compare them to those produced by NONMEM to make your decision to
> trust or not trust the values.
>
> =
------------------------------------------------------------------------
> *From:* owner-nmusers
> [mailto: owner-nmusers
> *Sent:* Tuesday, February 24, 2009 2:09 PM
> *To:* justin.wilkins
> *Cc:* nmusers
> *Subject:* Re: [NMusers] var-cov matrix issue?
>
> Hi Justin, only ETA was estimated with high SE
> but, again, I guess it came back to the question: how trustful it is =
if
> such error message appears
>
> =
------------------------------------------------------------------------
> *From:* " justin.wilkins
> *To:* ethan.wu75
> *Sent:* Tuesday, February 24, 2009 1:19:17 PM
> *Subject:* Fw: [NMusers] var-cov matrix issue?
>
>
> Dear Ethan,
>
> Algorithmically singular matrices are often a sign that that your =
model
> is ill-conditioned in some way; I would be careful in how I used the
> variance-covariance matrix in this scenario, and especially for
> simulation. Are there any parameters that are being estimated with
> particularly high standard errors? This might suggest =
overparamaterization.
>
> Not sure how helpful this is!
>
> Best
> Justin
> *Justin Wilkins
> Senior Modeler**
> Modeling & Simulation (Pharmacology)*
> CHBS, WSJ-027.6.076
> Novartis Pharma AG
> Lichtstrasse 35
> CH-4056 Basel
> Switzerland
> Phone: +41 61 324 6549
> Fax: +41 61 324 3039
> Cell: +41 76 561 0949
> Email : _justin.wilkins
justin.wilkins
>
>
>
> ----- Forwarded by Justin Wilkins/PH/Novartis on 2009/02/24 07:15 PM =
-----
> *Ethan Wu < ethan.wu75
> Sent by: owner-nmusers
>
> 2009/02/24 07:12 PM
>
>
> To
> nmusers
> cc
>
> Subject
> [NMusers] var-cov matrix issue?
>
>
>
>
>
>
>
>
> Dear all,
> I recently encounter this error message (below). My objective was to
> use nonmem var-cov output for approximation of distribution of
> parameters for performing a simulation.
> if such error message occur, is the var-cov matrix still OK to use?
> -- I know that better way to figure out distribution of parameters is =
to
> do bootstrap, but given limited time I have.....
>
> thanks
>
> "0MINIMIZATION SUCCESSFUL
> NO. OF FUNCTION EVALUATIONS USED: 331
> 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.11E-02
> SE: 0.23E-01
> P VAL.: 0.96E+00
> 0S MATRIX ALGORITHMICALLY SINGULAR
> 0S MATRIX IS OUTPUT
> 0INVERSE COVARIANCE MATRIX SET TO RS*R, WHERE S* IS A PSEUDO INVERSE =
OF S
> 1
> "
>
> ICON plc made the following annotations.
> =
-------------------------------------------------------------------------=
-----
> This e-mail transmission may contain confidential or legally =
privileged information
> that is intended only for the individual or entity named in the e-mail =
> are not the intended recipient, you are hereby notified that any =
disclosure, copying,
> distribution, or reliance upon the contents of this e-mail is strictly =
prohibited. If
the sender, so that
> ICON plc can arrange for proper delivery, and then please delete the =
message.
> Thank You,
> ICON plc
> Leopardstown
> Dublin 18
> Ireland
> Registered number: 145835
>
>

Received on Wed Feb 25 2009 - 14:08:37 EST

The NONMEM Users Network is maintained by ICON plc. Requests to subscribe to the network should be sent to: nmusers-request@iconplc.com.

Once subscribed, you may contribute to the discussion by emailing: nmusers@globomaxnm.com.