RE: Help please...

From: Vladimir Piotrovskij Date: February 06, 2001 technical Source: cognigencorp.com
From: "Piotrovskij, Vladimir [JanBe]" <VPIOTROV@janbe.jnj.com> Subject: RE: Help please... Date: Tue, 6 Feb 2001 13:45:46 +0100 Ganesh, I don't think the standard NONMEM output is a suitable sourse file for S-plus. The better way is to save final estimates of THETA, OMEGA and SIGMA is text files that can then be fed to S-plus (scan() function is most suitable for importing in this case). Some time ago I asked Alison how to save these estimates. I give below my question and her answer. Best regards, Vladimir ---------------------------------------------------------------------- Vladimir Piotrovsky, Ph.D. Janssen Research Foundation Human Pharmacokinetics (ext. 5463) B-2340 Beerse Belgium Email: vpiotrov@janbe.jnj.com ------------------------------------------------------------------ > If one does simulation/fitting and wants to perform, say, 100 simulations, > he certainly would like to have parameter estimates in one of the tables > besides a common output file. Is there any way to put THETA, OMEGA and SIGMA > estimates in a table. Or to get a reduced version of the output file just > with parameter estimates to facilitate further tabulating/analysis. Here is an answer that I sent to another user with a very similar question. Hope this helps. Alison =============== There are 2 ways to go about this. 1) The final parameter estimates, standard errors, and minimum value of the objective function can easily be extracted from a NONMEM output report using the little program nmsee that I have mentioned in email to this group before. Usage on Unix for standard errors: nmsee prefix out.sim | grep of Nmsee can be obtained at the NONMEM repository. Its in the directory NMSEE.DIR, under NONMEM.DIR. The full address is /public/nonmem.dir/nmsee.dir This is a reminder on how to access the repository: ftp 204.161.113.34 ftp pkpd.icon.palo-alto.med.va.gov World Wide Web at URL: http://pkpd.icon.palo-alto.med.va.gov/ http://pkpd.icon.palo-alto.med.va.gov/ 2) The final parameter estimates, standard errors, and other quantities are available in NONMEM read-only commons ROCM6, ROCM7, ROCM8, and ROCM9. These are discussed in Guide VIII, or try "nmhelp rocm6" etc. If you use $PRED, you can obtain them in a block of code that tests for ICALL.EQ.3. Or if you use PREDPP, you can use code such as the following in an INFN routine. E.g., if the code is in a file named myinfn, then specify $SUBROUTINES ... INFN=myinfn Here's the code. It is suitable for diagonal omega and sigma, but needs some modification for full omega or sigma. (Constants 40 and 30 in the declarations for THETAF etc. should be the same as the values given to LTH and LVR in file NSIZES, in case you changed those values.) It also performs a pass thru the data file to obtain individual etas, which you may delete if you do not want them. SUBROUTINE INFN(ICALL,THETA,DATREC,INDXS,NEWIND) DIMENSION THETA(*),DATREC(*),INDXS(*) DOUBLE PRECISION THETA COMMON /ROCM6/ THETAF(40), OMEGAF(30,30), SIGMAF(30,30) COMMON /ROCM7/ SETH(40),SEOM(30,30),SESIG(30,30) COMMON /ROCM8/ OBJECT COMMON /ROCM9/ IERE,IERC DOUBLE PRECISION THETAF, OMEGAF, SIGMAF DOUBLE PRECISION OBJECT REAL SETH,SEOM,SESIG DOUBLE PRECISION ETA(10) INTEGER J,I INTEGER IERE,IERC INTEGER MODE INTEGER NTH,NETA,NEPS C THE NEXT 3 LINES SHOULD BE EDITED FOR THE NUMBERS OF ETAs, THETAs C AND EPSILONs IN YOUR PROBLEM NTH=8 NETA=6 NEPS=2 IF (ICALL.EQ.0) THEN OPEN(49,FILE='ETA') OPEN(50,FILE='OBJECT') OPEN(51,FILE='THETA') OPEN(52,FILE='SETHETA') OPEN(53,FILE='OMEGA') OPEN(54,FILE='SEOMEGA') OPEN(55,FILE='SIGMA') OPEN(56,FILE='SESIGMA') OPEN(57,FILE='IERE_C') ENDIF C THE NEXT 11 LINES WRITE INDIVIDUAL ETAS IF 'POSTHOC' C OPTION CHOSEN IN THE ESTIMATION STEP IF (ICALL.EQ.3) THEN MODE=0 CALL PASS(MODE) MODE=1 20 CALL PASS(MODE) IF (MODE.EQ.0) GO TO 30 IF (NEWIND.NE.2) THEN CALL GETETA(ETA) WRITE (49,97) (ETA(I),I=1,NETA) ENDIF GO TO 20 30 CONTINUE WRITE (50,99) OBJECT WRITE (51,99) (THETAF(J),J=1,NTH) WRITE (52,99) (SETH(J),J=1,NTH) 7000 WRITE (53,99) (OMEGAF(J,J),J=1,NETA) WRITE (54,99) (SEOM(J,J),J=1,NETA) 7999 WRITE (55,99) (SIGMAF(J,J),J=1,NEPS) WRITE (56,99) (SESIG(J,J), J=1,NEPS) WRITE (57,98) IERE,IERC ENDIF 99 FORMAT (20F15.8) 98 FORMAT (2I8) 97 FORMAT (F8.0, 10E15.8) RETURN END With (say) $OMEGA BLOCK(3) .... the change is as follows: Locate: NETA=6 7000 WRITE (53,99) (OMEGAF(J,J),J=1,NETA) WRITE (54,99) (SEOM(J,J),J=1,NETA) Change to: NETA=3 7000 WRITE (53,99) ((OMEGAF(J,I),J=1,I),I=1,NETA) WRITE (54,99) ((SEOM(J,I),J=1,I),I=1,NETA)
Feb 05, 2001 Ruediger Port Reading NONMEM output into S-Plus
Feb 05, 2001 Ganesh R Iyer RE: Help please...
Feb 06, 2001 Vladimir Piotrovskij RE: Help please...
Feb 06, 2001 Ruediger Port Reading NONMEM output into S-Plus
Feb 06, 2001 Nick Holford Re: Reading NONMEM output into S-Plus
Feb 07, 2001 Niclas Jonsson Re: Reading NONMEM output into S-Plus
Feb 07, 2001 Vladimir Piotrovskij RE: Reading NONMEM output into S-Plus