Wings for NONMEM 

Home| Installation| Control Streams| Autocovariate| Bootstrap| Randomization Test   | Files | References

Please check the Download page for the latest version of WFN and links to new features.

R for NONMEM is available here

SourceForge LogoSupport for g77 can be found at the WFN SourceForge project.

The Commands page provides a brief description of all key WFN commands.

Nick Holford, n.holford@auckland.ac.nz, Department of Pharmacology & Clinical Pharmacology, University of Auckland, Auckland, New Zealand

Last updated 17 June 2008 [Note: The latest changes to WFN are recorded in wfndown.htm]

WFN is a set of DOS batch command files and awk scripts to help NONMEM users be more productive. The first version of WFN (Wheels for NONMEM) was written in 1989 at UC San Francisco. The unix csh and awk scripts evolved and were eventually ported to DOS in order to support NONMEM as part of the RIDO (Right Dose First Time) project.

Features

  • Simple invocation and presentation of NONMEM output (nmgo)
  • Ordered listing of results according to objective function value (nmobj, nmlst)
  • Extended control stream allows use of lower case and tabs, does not require numbered THETA, ETA, ERR values in model
  • Multiple NONMEM runs can be started from the same directory
  • Support for reading NONMEM table files into CrossGraphs and Xpose
  • Simple non-parametric bootstrap analysis of any NONMEM model (nmbs)
  • Parametric bootstrap of NONMEM models (cts)
  • Parametric and non-parametric generation of datasets which can be analysed using awk scripts (ncabs, ncasim)
  • Easy transfer of final parameter estimates to original control stream (nmctl)
  • Automated covariate model building (nmac)
  • Randomization test for determining true P value of log likelihood ratio test (nmrt)
  • Assistance with creation of Log likelihood profile (nmllp )
  • Support for NONMEM installation using NMQual

Licensing

Please see license.txt and gpl.txt. WFN is distributed under the terms of the GNU General Public License. It uses gawk.exe which is also distributed under the same terms.

A NONMEM Run

A key concept in WFN is the idea of a run. A run is based on an NM-TRAN control stream. The control stream filename (without its extension) defines the runname. NONMEM is invoked using the nmgo batch command file with the runname as its essential argument e.g. using the theopd.ctl control stream file:

nmgo theopd

You can execute nmgo from any directory you wish but the NMTRAN control stream file (e.g. theopd.ctl) must be in the current directory.

Do not attempt to use a path to point to a control stream in another directory. Long file names are supported but cannot contain embedded blank characters.

Very deeply nested sub-directory structures e.g. 8 levels below the root may not work with older compilers e.g. Watcom 10. Long file names may not work when used with older compilers e.g. Watcom 10 or on a network drive (for reasons I cannot understand).  The Open Watcom compiler does not have this problem.

nmgo creates a run directory for working files and the final run results, processes the control stream then invokes NM-TRAN, compiles, links and executes NONMEM. The NONMEM output listing is then processed to provide a run summary of the results.

Typical use of NONMEM involves several runs and comparison of the objective function value (obj). The nmobj command provides a simple table of runnames and obj values sorted in ascending obj order to make it easy to compare the overall goodness of fit of each run. The output of nmobj is stored in a file nmobj.txt.

Additional details can be obtained using the nmlst command which presents the summaries for all the runs in the same order as nmobj. These details are stored in a file nmlst.txt. Similar information is presented one line per run using the nmbt command. Results are stored in nmmbt.txt in tab delimited format.

Run Summary

The results of the theopd run are presented in summary form. The first 3 lines are column headings that display the parameter names aligned with the estimates underneath. The 4th line contains the run name (and nmout extension) followed by the objective function value, number of function evaluations, significant digits, number of subjects, and number of observations. The CIL= element indicates (N|Y) the various estimation options that might have been used (CONDITIONAL, CENTERED, INTERACTION, LAPLACIAN). Finally the NONMEM version number and PREDPP version number (if used) are displayed.

Note that the ETASD and ERRSD are used to indicate that the square root of the OMEGA and SIGMA values is displayed. In this example a proportional model has been used for the variability of each parameter so that an ETASD for E0 of 0.04219 can be interpreted as an approximate CV of 4.219%.

THETA:      POPE0       POPEMAX     POPEC50
ETA:        ETAE0       ETAEMAX     ETAEC50
ERR:        ERRSD
theopd.lst 5802.086 eval=259 sig=3.0 sub=153 obs=574 CCIL=NNNN NV1.1
THETA     = 146         164         6.55
ETASD     = 0.04219     0.488876    1.2083
ERRSD     = 81.1788
THETA:se% = 7.5         12.6        29.9
OMEGA:se% = 4179.8      43.1        78.8
SIGMA:se% = 10.6

MINIMIZATION SUCCESSFUL
user 0:6.2 real 0:6.2 tcl 0:3.81

The last line of the run summary shows the execution time for the NONMEM part of the run (user and real will be the same on DOS systems. real will be longer than user on unix systems). Tcl is the time for the control stream translation, compile and link part of the run. Times are formatted as minutes:seconds.
 

Run Directory

The run directory is used as a working directory for NM-TRAN and NONMEM temporary files. These files are deleted at the end of a run unless the DOS environment variable nmclean is set to "n". The run directory name is made up from the runname and an extension which by default reflects the compiler e.g. theopd.df would be the run directory created if the df compiler system is used.

The run results files saved at the end of each run are:
 

Runname.lst

NONMEM output listing (see nmout)

Runname.smy

Run summary (one line per problem or sub-problem)

Runname.smr

Run summary with control stream appended

Runname.log

A log file which may contain information about errors if a problem arises

Runname.ctl

The control stream used by NM-TRAN (see nmctl)

Runname.fit

Table file if $TABLE NOPRINT is specified (see nmtbl)

Runname.msf

MSFO file if MSFO is specified

Home| Installation| Control Streams| Autocovariate| Bootstrap| Randomization Test   | Files | References