OMEGA off-diagonal elements parameterized as correlations

6 messages 4 people Latest: Jul 11, 2009
Dear all, I was wondering if it is possible to insert the off-diagonal elements of OMEGA as correlations rather than covariances, because I find it more intuitive. To my greatest happiness, I found the following information in a NONMEM chm help file: ___________________________________________________________________ | | | $OMEGA | |_________________________________________________________________| MEANING: Supplies initial estimates for the NONMEM OMEGA Matrix CONTEXT: NM-TRAN Control Record USAGE: $OMEGA [DIAGONAL(n)|BLOCK(n)|BLOCK(n) SAME|BLOCK SAME] 5 [[value1] [value2] [value3] ... [FIXED]] 5 $OMEGA [DIAGONAL(n)|BLOCK(n)|BLOCK(n,m) L [[value1] [value2] [value3]] ... L [VARIANCE|STANDARD] [COVARIANCE|CORRELATON] L [FIXED] [ALLOFFFIX] [FIRSTFIXED] [PRINCIPAL]] L |BLOCK(n) SAME|BLOCK SAME] L SAMPLE: $OMEGA BLOCK(3) 6. .005 .3 .0002 .006 .4 Reading on in the file, the [COVARIANCE|CORRELATON] sounded (in spite of the incorrect spelling) like the panacea I was looking for. Unfortunately, when I try to compile, I get a message saying that this option is not available in NONMEM VI. :-( Is this sadly only a feature planned for future versions of NONMEM? And if so, does anyone you know of other simple workarounds to use correlations instead of covariances? Thank you in advance, Paolo -- ------------------------------------------------ Paolo Denti, Post-Doctoral Fellow Division of Clinical Pharmacology Department of Medicine University of Cape Town K45 Old Main Building Groote Schuur Hospital Observatory, Cape Town 7925 South Africa phone: +27 21 404 7719 fax: +27 21 448 1989 email: [email protected]
Paolo You may use tools that drive the Nonmem program and output parameters in a more friendly manner For example Wings for Nonmem (the nmgo command expresses non diag terms as correlations) or PsN for example Saïk
Quoted reply history
----- Original Message ----- From: "Paolo Denti" <[email protected]> To: <[email protected]> Sent: Wednesday, July 08, 2009 2:36 PM Subject: [NMusers] OMEGA off-diagonal elements parameterized as correlations > Dear all, > I was wondering if it is possible to insert the off-diagonal elements of > OMEGA as correlations rather than covariances, because I find it more > intuitive. > > To my greatest happiness, I found the following information in a NONMEM > chm help file: > > ___________________________________________________________________ > | | > | $OMEGA | > |_________________________________________________________________| > > MEANING: Supplies initial estimates for the NONMEM OMEGA Matrix > CONTEXT: NM-TRAN Control Record > > USAGE: > $OMEGA [DIAGONAL(n)|BLOCK(n)|BLOCK(n) SAME|BLOCK SAME] 5 > [[value1] [value2] [value3] ... [FIXED]] 5 > $OMEGA [DIAGONAL(n)|BLOCK(n)|BLOCK(n,m) L > [[value1] [value2] [value3]] ... L > [VARIANCE|STANDARD] [COVARIANCE|CORRELATON] L > [FIXED] [ALLOFFFIX] [FIRSTFIXED] [PRINCIPAL]] L > |BLOCK(n) SAME|BLOCK SAME] L > > SAMPLE: > $OMEGA BLOCK(3) 6. .005 .3 .0002 .006 .4 > > Reading on in the file, the [COVARIANCE|CORRELATON] sounded (in spite of > the incorrect spelling) like the panacea I was looking for. > Unfortunately, when I try to compile, I get a message saying that this > option is not available in NONMEM VI. :-( > Is this sadly only a feature planned for future versions of NONMEM? > And if so, does anyone you know of other simple workarounds to use > correlations instead of covariances? > > Thank you in advance, > Paolo > > > -- > ------------------------------------------------ > Paolo Denti, Post-Doctoral Fellow > Division of Clinical Pharmacology > Department of Medicine > University of Cape Town > > K45 Old Main Building > Groote Schuur Hospital > Observatory, Cape Town > 7925 South Africa > phone: +27 21 404 7719 > fax: +27 21 448 1989 > email: [email protected] > ------------------------------------------------ > >
Paolo, I too was disappointed when NONMEM VI appeared without the $OMEGA CORRELATION option. I agree with you that correlations are more intuitive and easier to use than covariances. Unfortunately NONMEM VII beta continues with the same lack of support for a CORRELATION option. AN ERROR WAS FOUND IN THE CONTROL STATEMENTS. AN ERROR WAS FOUND ON LINE 12 AT THE APPROXIMATE POSITION NOTED: $OMEGA BLOCK(3) CORRELATION X 584 THIS FEATURE IS NOT PART OF NONMEM VII. I wonder if someone from the NONMEM development team could explain why this feature remains unimplemented? Nick Paolo Denti wrote: > Dear all, > > I was wondering if it is possible to insert the off-diagonal elements of OMEGA as correlations rather than covariances, because I find it more intuitive. > > To my greatest happiness, I found the following information in a NONMEM chm help file: > > ___________________________________________________________________ > | | > | $OMEGA | > |_________________________________________________________________| > > MEANING: Supplies initial estimates for the NONMEM OMEGA Matrix > CONTEXT: NM-TRAN Control Record > > USAGE: > $OMEGA [DIAGONAL(n)|BLOCK(n)|BLOCK(n) SAME|BLOCK SAME] 5 > [[value1] [value2] [value3] ... [FIXED]] 5 > $OMEGA [DIAGONAL(n)|BLOCK(n)|BLOCK(n,m) L > [[value1] [value2] [value3]] ... L > [VARIANCE|STANDARD] [COVARIANCE|CORRELATON] L > [FIXED] [ALLOFFFIX] [FIRSTFIXED] [PRINCIPAL]] L > |BLOCK(n) SAME|BLOCK SAME] L > > SAMPLE: > $OMEGA BLOCK(3) 6. .005 .3 .0002 .006 .4 > > Reading on in the file, the [COVARIANCE|CORRELATON] sounded (in spite of the incorrect spelling) like the panacea I was looking for. Unfortunately, when I try to compile, I get a message saying that this option is not available in NONMEM VI. :-( > > Is this sadly only a feature planned for future versions of NONMEM? > > And if so, does anyone you know of other simple workarounds to use correlations instead of covariances? > > Thank you in advance, > Paolo -- Nick Holford, Professor Clinical Pharmacology Dept Pharmacology & Clinical Pharmacology University of Auckland, 85 Park Rd, Private Bag 92019, Auckland, New Zealand [email protected] tel:+64(9)923-6730 fax:+64(9)373-7090 mobile: +33 64 271-6369 (Apr 6-Jul 20 2009) http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford
Nick, I can only offer you a litle bit of history. The CORRELATION option for $OMEGA was supported by NMTRAN and described in NONMEM VI's help guide during most of its development, from Oct 2000 till at least May 2005. Several other interesting new options were described, such as VARIANCE vs. STANDARD. It is less easy for me to track the years during which these options were actually implemented in early versions of NONMEM VI. Presumably Paolo must have had access to the on-line help that was distributed with a beta test version. Perhaps some of the former fellows remember. By the time Tom Ludden and I were finalizing NONMEM VI 1.0, after Stuart Beal's death in January 2006, Stuart had deleted these new features from NONMEM VI. It was not uncommon for Stuart to put an experimental new feature in NONMEM, and later decide that it was not worth while and withdraw it. The OMEGA help entry back was restored to what it had been, and NMTRAN was changed to give an error message saying that this feature is not available with NONMEM VI, just in case a previous beta tester might still try to use them. The feature was never restored to NONMEM because, basically, no one asked for it. You might say, how could we ask for something we did not know about? Good point. It can be put on the list for a future release, though it is too late for NONMEM VII 1.0. On Wed, 08 Jul 2009 17:07:00 +0200, "Nick Holford" <[email protected]> said: > Paolo, > > I too was disappointed when NONMEM VI appeared without the $OMEGA > CORRELATION option. I agree with you that correlations are more > intuitive and easier to use than covariances. > > Unfortunately NONMEM VII beta continues with the same lack of support > for a CORRELATION option. > > AN ERROR WAS FOUND IN THE CONTROL STATEMENTS. > > AN ERROR WAS FOUND ON LINE 12 AT THE APPROXIMATE POSITION NOTED: > $OMEGA BLOCK(3) CORRELATION X 584 THIS > FEATURE IS NOT PART OF NONMEM VII. > > I wonder if someone from the NONMEM development team could explain why > this feature remains unimplemented? > > Nick > > Paolo Denti wrote: > > Dear all, I was wondering if it is possible to insert the off- > > diagonal elements of OMEGA as correlations rather than covariances, > > because I find it more intuitive. > > > > To my greatest happiness, I found the following information in a > > NONMEM chm help file: > > > > ___________________________________________________________________ > > | | > > | $OMEGA | > > | __________________________________- > > | _______________________________| > > > > MEANING: Supplies initial estimates for the NONMEM OMEGA Matrix > > CONTEXT: NM-TRAN Control Record > > > > USAGE: $OMEGA [DIAGONAL(n)|BLOCK(n)|BLOCK(n) SAME|BLOCK SAME] 5 > > [[value1] [value2] [value3] ... [FIXED]] 5 $OMEGA > > [DIAGONAL(n)|BLOCK(n)|BLOCK(n,m) L [[value1] [value2] > > [value3]] ... L [VARIANCE|STANDARD] [COVARIANCE|CORRELATON] > > L [FIXED] [ALLOFFFIX] [FIRSTFIXED] [PRINCIPAL]] L > > |BLOCK(n) SAME|BLOCK SAME] L > > > > SAMPLE: $OMEGA BLOCK(3) 6. .005 .3 .0002 .006 .4 > > > > Reading on in the file, the [COVARIANCE|CORRELATON] sounded (in > > spite of the incorrect spelling) like the panacea I was looking for. > > Unfortunately, when I try to compile, I get a message saying that > > this option is not available in NONMEM VI. :-( Is this sadly only a > > feature planned for future versions of NONMEM? And if so, does > > anyone you know of other simple workarounds to use correlations > > instead of covariances? > > > > Thank you in advance, Paolo > > > > > > -- > Nick Holford, Professor Clinical Pharmacology Dept Pharmacology & > Clinical Pharmacology University of Auckland, 85 Park Rd, Private Bag > 92019, Auckland, New Zealand > [email protected] tel:+64(9)923-6730 fax:+64(9)373-7090 mobile: > +33 64 271-6369 (Apr 6-Jul 20 2009) > http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford > > -- Alison Boeckmann [email protected]
Alison, Thanks very much for taking the time to document the history of the CORRELATION option. I hope that a future release of NONMEM might add it back again. It doesnt seem like it would be too much work as it seems like it is only a simple reparameterization of the OMEGA matrix. Nick Alison Boeckmann wrote: > Nick, > > I can only offer you a litle bit of history. > > The CORRELATION option for $OMEGA was supported by NMTRAN and described > in NONMEM VI's help guide during most of its development, from Oct 2000 > till at least May 2005. Several other interesting new options were > described, such as VARIANCE vs. STANDARD. > > It is less easy for me to track the years during which these options > were actually implemented in early versions of NONMEM VI. Presumably > Paolo must have had access to the on-line help that was distributed with > a beta test version. Perhaps some of the former fellows remember. > > By the time Tom Ludden and I were finalizing NONMEM VI 1.0, after Stuart > Beal's death in January 2006, Stuart had deleted these new features from > NONMEM VI. It was not uncommon for Stuart to put an experimental new > feature in NONMEM, and later decide that it was not worth while and > withdraw it. The OMEGA help entry back was restored to what it had been, > and NMTRAN was changed to give an error message saying that this feature > is not available with NONMEM VI, just in case a previous beta tester > might still try to use them. > > The feature was never restored to NONMEM because, basically, no one > asked for it. You might say, how could we ask for something we did not > know about? Good point. It can be put on the list for a future release, > though it is too late for NONMEM VII 1.0. > > On Wed, 08 Jul 2009 17:07:00 +0200, "Nick Holford" > <[email protected]> said: > > > Paolo, > > > > I too was disappointed when NONMEM VI appeared without the $OMEGA > > CORRELATION option. I agree with you that correlations are more > > intuitive and easier to use than covariances. > > > > Unfortunately NONMEM VII beta continues with the same lack of support > > for a CORRELATION option. > > > > AN ERROR WAS FOUND IN THE CONTROL STATEMENTS. > > > > AN ERROR WAS FOUND ON LINE 12 AT THE APPROXIMATE POSITION NOTED: > > $OMEGA BLOCK(3) CORRELATION X 584 THIS > > FEATURE IS NOT PART OF NONMEM VII. > > > > I wonder if someone from the NONMEM development team could explain why > > this feature remains unimplemented? > > > > Nick > > > > Paolo Denti wrote: > > > > > Dear all, I was wondering if it is possible to insert the off- > > > diagonal elements of OMEGA as correlations rather than covariances, > > > because I find it more intuitive. > > > > > > To my greatest happiness, I found the following information in a > > > NONMEM chm help file: > > > > > > ___________________________________________________________________ > > > | | > > > | $OMEGA | > > > | __________________________________- > > > | _______________________________| > > > > > > MEANING: Supplies initial estimates for the NONMEM OMEGA Matrix > > > CONTEXT: NM-TRAN Control Record > > > > > > USAGE: $OMEGA [DIAGONAL(n)|BLOCK(n)|BLOCK(n) SAME|BLOCK SAME] 5 > > > [[value1] [value2] [value3] ... [FIXED]] 5 $OMEGA > > > [DIAGONAL(n)|BLOCK(n)|BLOCK(n,m) L [[value1] [value2] > > > [value3]] ... L [VARIANCE|STANDARD] [COVARIANCE|CORRELATON] > > > L [FIXED] [ALLOFFFIX] [FIRSTFIXED] [PRINCIPAL]] L > > > |BLOCK(n) SAME|BLOCK SAME] L > > > > > > SAMPLE: $OMEGA BLOCK(3) 6. .005 .3 .0002 .006 .4 > > > > > > Reading on in the file, the [COVARIANCE|CORRELATON] sounded (in > > > spite of the incorrect spelling) like the panacea I was looking for. > > > Unfortunately, when I try to compile, I get a message saying that > > > this option is not available in NONMEM VI. :-( Is this sadly only a > > > feature planned for future versions of NONMEM? And if so, does > > > anyone you know of other simple workarounds to use correlations > > > instead of covariances? > > > > > > Thank you in advance, Paolo > > > > -- > > Nick Holford, Professor Clinical Pharmacology Dept Pharmacology & > > Clinical Pharmacology University of Auckland, 85 Park Rd, Private Bag > > 92019, Auckland, New Zealand > > [email protected] tel:+64(9)923-6730 fax:+64(9)373-7090 mobile: > > +33 64 271-6369 (Apr 6-Jul 20 2009) > > http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford -- Nick Holford, Professor Clinical Pharmacology Dept Pharmacology & Clinical Pharmacology University of Auckland, 85 Park Rd, Private Bag 92019, Auckland, New Zealand [email protected] tel:+64(9)923-6730 fax:+64(9)373-7090 mobile: +33 64 271-6369 (Apr 6-Jul 20 2009) http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford
Steve, I dont see the need for two OMEGA matrices. Here is an example awk code showing how to transform a more user friendly UMEGA matrix expressed as SD on the diagonal and correlation on the off-diagonal into an OMEGA matrix with variance on the diagonal and covariance on the off-diagonal. ; UMEGA - User friendly version 0.01 0.3 1 0.1 0.3 10 ; OMEGA - Standard NONMEM version 0.0001 0.300015 1 1 3.01496 100 BEGIN { #OMEGA BLOCK(3) CORRELATION #0.01 #0.3 1 #0.1 0.3 10 n=3 UMEGA[1,1]=0.01 UMEGA[2,1]=0.3 UMEGA[2,2]=1 UMEGA[3,1]=0.1 UMEGA[3,2]=0.3 UMEGA[3,3]=10 showmat(UMEGA) U2O() showmat(OMEGA) O2U() showmat(UMEGA) exit } function U2O() { # covij= corrij*sqrt(SDi^2+SDj^2) for (i=1; i<=n; i++) { for (j=1; j<=i; j++) { if (j==i) { OMEGA[i,i]=UMEGA[i,i]^2 } else { OMEGA[i,j]=UMEGA[i,j]*sqrt(UMEGA[i,i]^2+UMEGA[j,j]^2) } } } } function O2U() { # corrij= covij*sqrt(vari+varj) for (i=1; i<=n; i++) { for (j=1; j<=i; j++) { if (j==i) { UMEGA[i,i]=sqrt(OMEGA[i,i]) } else { UMEGA[i,j]=OMEGA[i,j]/sqrt(OMEGA[i,i]+OMEGA[j,j]) } } } } function showmat(MAT) { for (i=1; i<=n; i++) { for (j=1; j<=i; j++) { if (j==i) { printf("%s\t",MAT[i,i]) } else { printf("%s\t",MAT[i,j]) } } print "" } print "" } Stephen Duffull wrote: > Nick > > If you used CORRELATION it would require double entry of the OMEGA matrix - > perhaps it was considered that this might result in transcription errors (we > aren't as accurate as DNA in this regard). > > The correlation matrix is a scaled variance matrix where all the variances are > scaled to 1 and covariances are therefore automatically scaled to -1:1. So you > would need to provide the SD (or variance) of the diagonal elements and as well > the correlation matrix in order to recreate the OMEGA matrix. > > I agree that correlations are more natural. > > Steve > > > -----Original Message-----
Quoted reply history
> > From: [email protected] [mailto:owner- > > [email protected]] On Behalf Of Nick Holford > > Sent: Saturday, 11 July 2009 6:31 a.m. > > To: nmusers > > Subject: Re: [NMusers] OMEGA off-diagonal elements parameterized as > > correlations > > > > Alison, > > > > Thanks very much for taking the time to document the history of the > > CORRELATION option. I hope that a future release of NONMEM might add it > > back again. It doesnt seem like it would be too much work as it seems > > like it is only a simple reparameterization of the OMEGA matrix. > > > > Nick > > > > Alison Boeckmann wrote: > > > > > Nick, > > > > > > I can only offer you a litle bit of history. > > > > > > The CORRELATION option for $OMEGA was supported by NMTRAN and > > > > described > > > > > in NONMEM VI's help guide during most of its development, from Oct > > > > 2000 > > > > > till at least May 2005. Several other interesting new options were > > > described, such as VARIANCE vs. STANDARD. > > > > > > It is less easy for me to track the years during which these options > > > were actually implemented in early versions of NONMEM VI. Presumably > > > Paolo must have had access to the on-line help that was distributed > > > > with > > > > > a beta test version. Perhaps some of the former fellows remember. > > > > > > By the time Tom Ludden and I were finalizing NONMEM VI 1.0, after > > > > Stuart > > > > > Beal's death in January 2006, Stuart had deleted these new features > > > > from > > > > > NONMEM VI. It was not uncommon for Stuart to put an experimental new > > > feature in NONMEM, and later decide that it was not worth while and > > > withdraw it. The OMEGA help entry back was restored to what it had > > > > been, > > > > > and NMTRAN was changed to give an error message saying that this > > > > feature > > > > > is not available with NONMEM VI, just in case a previous beta tester > > > might still try to use them. > > > > > > The feature was never restored to NONMEM because, basically, no one > > > asked for it. You might say, how could we ask for something we did > > > > not > > > > > know about? Good point. It can be put on the list for a future > > > > release, > > > > > though it is too late for NONMEM VII 1.0. > > > > > > On Wed, 08 Jul 2009 17:07:00 +0200, "Nick Holford" > > > <[email protected]> said: > > > > > > > Paolo, > > > > > > > > I too was disappointed when NONMEM VI appeared without the $OMEGA > > > > CORRELATION option. I agree with you that correlations are more > > > > intuitive and easier to use than covariances. > > > > > > > > Unfortunately NONMEM VII beta continues with the same lack of > > > > support > > > > > > for a CORRELATION option. > > > > > > > > AN ERROR WAS FOUND IN THE CONTROL STATEMENTS. > > > > > > > > AN ERROR WAS FOUND ON LINE 12 AT THE APPROXIMATE POSITION NOTED: > > > > $OMEGA BLOCK(3) CORRELATION X 584 THIS > > > > FEATURE IS NOT PART OF NONMEM VII. > > > > > > > > I wonder if someone from the NONMEM development team could explain > > > > why > > > > > > this feature remains unimplemented? > > > > > > > > Nick > > > > > > > > Paolo Denti wrote: > > > > > > > > > Dear all, I was wondering if it is possible to insert the off- > > > > > diagonal elements of OMEGA as correlations rather than covariances, > > > > > because I find it more intuitive. > > > > > > > > > > To my greatest happiness, I found the following information in a > > > > > NONMEM chm help file: > > > > > > > > > > ___________________________________________________________________ > > > > > | | > > > > > | $OMEGA | > > > > > | > > > > __________________________________- > > > > > > > | _______________________________| > > > > > > > > > > MEANING: Supplies initial estimates for the NONMEM OMEGA Matrix > > > > > CONTEXT: NM-TRAN Control Record > > > > > > > > > > USAGE: $OMEGA [DIAGONAL(n)|BLOCK(n)|BLOCK(n) SAME|BLOCK SAME] 5 > > > > > [[value1] [value2] [value3] ... [FIXED]] 5 $OMEGA > > > > > [DIAGONAL(n)|BLOCK(n)|BLOCK(n,m) L [[value1] [value2] > > > > > [value3]] ... L [VARIANCE|STANDARD] [COVARIANCE|CORRELATON] > > > > > L [FIXED] [ALLOFFFIX] [FIRSTFIXED] [PRINCIPAL]] L > > > > > |BLOCK(n) SAME|BLOCK SAME] L > > > > > > > > > > SAMPLE: $OMEGA BLOCK(3) 6. .005 .3 .0002 .006 .4 > > > > > > > > > > Reading on in the file, the [COVARIANCE|CORRELATON] sounded (in > > > > > spite of the incorrect spelling) like the panacea I was looking > > > > for. > > > > > > > Unfortunately, when I try to compile, I get a message saying that > > > > > this option is not available in NONMEM VI. :-( Is this sadly only a > > > > > feature planned for future versions of NONMEM? And if so, does > > > > > anyone you know of other simple workarounds to use correlations > > > > > instead of covariances? > > > > > > > > > > Thank you in advance, Paolo > > > > > > > > -- > > > > Nick Holford, Professor Clinical Pharmacology Dept Pharmacology & > > > > Clinical Pharmacology University of Auckland, 85 Park Rd, Private > > > > Bag > > > > > > 92019, Auckland, New Zealand > > > > [email protected] tel:+64(9)923-6730 fax:+64(9)373-7090 > > > > mobile: > > > > > > +33 64 271-6369 (Apr 6-Jul 20 2009) > > > > http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford > > > > -- > > Nick Holford, Professor Clinical Pharmacology > > Dept Pharmacology & Clinical Pharmacology > > University of Auckland, 85 Park Rd, Private Bag 92019, Auckland, New > > Zealand > > [email protected] tel:+64(9)923-6730 fax:+64(9)373-7090 > > mobile: +33 64 271-6369 (Apr 6-Jul 20 2009) > > http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford -- Nick Holford, Professor Clinical Pharmacology Dept Pharmacology & Clinical Pharmacology University of Auckland, 85 Park Rd, Private Bag 92019, Auckland, New Zealand [email protected] tel:+64(9)923-6730 fax:+64(9)373-7090 mobile: +33 64 271-6369 (Apr 6-Jul 20 2009) http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford