permissible band matrix

4 messages 4 people Latest: Oct 12, 2007

RE: permissible band matrix

From: Brian Sadler Date: October 12, 2007 technical
Hi Sam, It might have something to do with the fact that the second example can be written with two $BLOCK(2) statements and the first example can't. Cheers... Brian
Quoted reply history
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sam Liao Sent: Friday, October 12, 2007 10:44 AM To: nmusers Subject: [NMusers] permissible band matrix Dear NONMEM users: Can someone please help me to solve this problem with a band matrix? $OMEGA BLOCK(4) 0.09 ;BSV_V1C 0.07 0.09 ;BSV_CLC 0 0.07 0.09 ;BSV_CLN 0 0 0.07 0.09 ;BSV_V1N Why this one above is getting an error in NONMEM? $OMEGA BLOCK(4) 0.09 ;BSV_V1C 0.07 0.09 ;BSV_CLC 0 0 0.09 ;BSV_CLN 0 0 0.07 0.09 ;BSV_V1N This one above is fine, but I need to run a simulation in which there are some correlation between CLC and CLN. There were some very helpful discussion on band matrix few years ago. But I still couldn't figure out why this band matrix not permissible. Sam Liao http://www.cognigencorp.com/nonmem/nm/96mar232001.html

Re: permissible band matrix

From: Leonid Gibiansky Date: October 12, 2007 technical
OMEGA matrix should be positive definite, and the one that you use is not of this class: > b <- 7 > a <- 9 > b1 <- 7 > aa <- matrix(c(a,b1,0,0,b1,a,b,0,0,b,a,b1,0,0,b1,a),4,4) > aa [,1] [,2] [,3] [,4] [1,] 9 7 0 0 [2,] 7 9 7 0 [3,] 0 7 9 7 [4,] 0 0 7 9 > det(aa) [1] -2945 Leonid -------------------------------------- Leonid Gibiansky, Ph.D. President, QuantPharm LLC web: www.quantpharm.com e-mail: LGibiansky at quantpharm.com tel: (301) 767 5566 Sam Liao wrote: > Dear NONMEM users: > > Can someone please help me to solve this problem with a band matrix? > > $OMEGA BLOCK(4) > 0.09 ;BSV_V1C > 0.07 0.09 ;BSV_CLC > 0 0.07 0.09 ;BSV_CLN > 0 0 0.07 0.09 ;BSV_V1N > Why this one above is getting an error in NONMEM? > > $OMEGA BLOCK(4) > 0.09 ;BSV_V1C > 0.07 0.09 ;BSV_CLC > 0 0 0.09 ;BSV_CLN > 0 0 0.07 0.09 ;BSV_V1N > > This one above is fine, but I need to run a simulation in which there are some correlation between CLC and CLN. > > There were some very helpful discussion on band matrix few years ago. But I still couldn't figure out why this band matrix not permissible. > > Sam Liao > http://www.cognigencorp.com/nonmem/nm/96mar232001.html

Re: permissible band matrix

From: Sam Liao Date: October 12, 2007 technical
Thanks everyone for your kindly reply. I have Al's reply posted below. The explanation and S+ codes provided by Al Maloney is helpful. Sam ====================================== Hi Sam, I expect you will get better replies, but here is a short answer. The proposed matrix is not positive definite (i.e. you have at least 1 negative eigenvalue). Said in a nicer way, your var-cov matrix must be consistent with itself. That is, you can't have a very strong correlation between parameters 1 and 2 (say 0.99), and between 1 and 3 (say 0.99), but then have no correlation between 2 and 3 (in this case, the strongest correlation you can have is 1/sqrt(2) I think (about 0.7). To solve your problem, you will either need to reduce some correlations that are non-zero, or increase some correlations that are currently zero. Here are a few lines of SPLUS code that will give the eigenvalues. The first gives a negative eigenvalue, but the second has all postive eigenvalues, and hence should work in NONMEM. doesnotwork=t(cbind(c(0.09,0.07,0,0),c(0.07,0.09,0.07,0),c(0.0,0.07,0.09,0.0 7), c(0.0,0.0,0.07,0.09))) neweigen = eigen(doesnotwork, symmetric = TRUE) neweigen$values doeswork=t(cbind(c(0.09,0.05,0,0),c(0.05,0.09,0.05,0),c(0.0,0.05,0.09,0.05), c(0.0,0.0,0.05,0.09))) neweigen2 = eigen(doeswork, symmetric = TRUE) neweigen2$values good luck, AL > OMEGA matrix should be positive definite, and the one that you use is not of this class: > > > b <- 7 > > a <- 9 > > b1 <- 7 > > aa <- matrix(c(a,b1,0,0,b1,a,b,0,0,b,a,b1,0,0,b1,a),4,4) > > aa > [,1] [,2] [,3] [,4] > [1,] 9 7 0 0 > [2,] 7 9 7 0 > [3,] 0 7 9 7 > [4,] 0 0 7 9 > > det(aa) > [1] -2945 > > Leonid > > -------------------------------------- > Leonid Gibiansky, Ph.D. > President, QuantPharm LLC > web: www.quantpharm.com > e-mail: LGibiansky at quantpharm.com > tel: (301) 767 5566 > > Sam Liao wrote: > > > Dear NONMEM users: > > > > Can someone please help me to solve this problem with a band matrix? > > > > $OMEGA BLOCK(4) > > 0.09 ;BSV_V1C > > 0.07 0.09 ;BSV_CLC > > 0 0.07 0.09 ;BSV_CLN > > 0 0 0.07 0.09 ;BSV_V1N > > Why this one above is getting an error in NONMEM? > > > > $OMEGA BLOCK(4) > > 0.09 ;BSV_V1C > > 0.07 0.09 ;BSV_CLC > > 0 0 0.09 ;BSV_CLN > > 0 0 0.07 0.09 ;BSV_V1N > > > > This one above is fine, but I need to run a simulation in which there are some correlation between CLC and CLN. > > > > There were some very helpful discussion on band matrix few years ago. But I still couldn't figure out why this band matrix not permissible. > > > > Sam Liao > > http://www.cognigencorp.com/nonmem/nm/96mar232001.html

RE: permissible band matrix

From: Mark Sale Date: October 12, 2007 technical
Sam, I think you should have gotten the error: INITIAL ESTIMATE OF OMEGA HAS A NONZERO BLOCK WHICH IS NUMERICALLY NOT POSITIVE DEFINITE which is the case. (you can check this in Excel, using the MDETERM function, the determinant is -2945). When you get this message, try reducing the off-diagonal elements, I think you'll find that $OMEGA BLOCK(4) 9 5 9 0 5 9 0 0 5 9 will work Mark Mark Sale MD Next Level Solutions, LLC www.NextLevelSolns.com 919-846-9185 > -------- Original Message -------- From: Sam Liao <[EMAIL PROTECTED]> Date: Fri, October 12, 2007 10:43 am To: nmusers < > > [email protected] > > > Dear NONMEM users: Can someone please help me to solve this problem with a band matrix? $OMEGA BLOCK(4) 0.09 ;BSV_V1C 0.07 0.09 ;BSV_CLC 0 0.07 0.09 ;BSV_CLN 0 0 0.07 0.09 ;BSV_V1N Why this one above is getting an error in NONMEM? $OMEGA BLOCK(4) 0.09 ;BSV_V1C 0.07 0.09 ;BSV_CLC 0 0 0.09 ;BSV_CLN 0 0 0.07 0.09 ;BSV_V1N This one above is fine, but I need to run a simulation in which there are some correlation between CLC and CLN. There were some very helpful discussion on band matrix few years ago. But I still couldn't figure out why this band matrix not permissible. Sam Liao < > > http://www.cognigencorp.com/nonmem/nm/96mar232001.html > > >