Wings for NONMEM Get Wings for NONMEM at SourceForge.net. Fast, secure and Free Open Source software downloads

 

Home | Installation | Control Streams | Bootstrap | Randomization Test | Visual Predictive Check | Autocovariate | Files | References

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

R for NONMEM can be downloaded from here,

EditPlus files for NM-TRAN, awk, R, cmd, Fortran are located in the WFN web folder.

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 21 June 2024 [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)
  • 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
  • Ordered listing of results according to objective function value (nmobj)
  • Simple non-parametric bootstrap analysis of any NONMEM model (nmbs)
  • Bootstrap analysis using NONMEM with $SIM BOOTSTRAP=-1 option (nmbsi)
  • Randomization test for determining true P value of log likelihood ratio test (nmrt)
  • Parametric bootstrap of NONMEM models (nmgosim, cts)
  • Assistance with creation of Log likelihood profile (nmllp )
  • Easy transfer of final parameter estimates to original control stream (nmctl)
  • Support for reading NONMEM table files into CrossGraphs and Xpose
  • Support for NONMEM 7 installation using nminstall
  • Command line execution and bootstrap support for Monolix (mlxgo, mlxbs, nmgosim)
  • Creation of Visual Predictive Checks using R (nmvpc)
  • Parallel threaded execution of nmgo using multiple nodes (cpus or hosts)
  • Parallel execution of nmbs, nmgosim, nmrt using multiple command shells.

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.

Note: 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.

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 nmmbt 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, estimation method, number of function evaluations, significant digits, number of subjects, and number of observations. Finally the NONMEM version number and PREDPP version number (if used) are displayed.

Note that the ETASD and EPSSD 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.099 can be interpreted as an approximate CV of 9.9%. Empirical Bayes estimate diagnostics test if the ETA average is 0 (ETAPval) and the percent shrinkage of ETA (ETAshr%, EBVshr%) and EPS (EPSshr%). Shrinkage is shown using the standard deviation method. The relative standard error of the random effect estimates (OMEGA and SIGMA) are expressed relative to ETASD and EPSD. The format can be modified using NMRAW.

THETA:      POP_E0      POP_EMAX    POP_EC50

ETA:        PPV_E0      PPV_EMAX    PPV_EC50

ERR:        RUV_SD

theopd.lst  5801.321    FOCE eval=295 sig=+4.2 sub=153 obs=574 NM7.4.0

THETA     = 139         191         8.8

 

ETASD     = 0.099       0.268       1.463

 

ETAPval   = 0.346       0.000       0.605

ETAshrSD% = 81.0        55.8        35.6

EBVshrSD% = 81.8        59.6        29.9

EPSshrSD% = 9.3

 

EPSSD     = 81.055

 

THETA:se% = 6.9         9.4         14.9

ETASD:se% = 168.6       20.7        16.9

EPSSD:se% = 5.3

 

MINIMIZATION SUCCESSFUL

 

 Ttot 0:3.87 Test 0:1.7 Tcov 0:0.73 Ttcl 0:1.42

The last line of the run summary shows the total execution time (Ttot), NONMEM estimation time (Test), covariance time (Tcov) and the time for the control stream translation, compile and link part of the run (Tcl). Times are formatted as minutes:seconds for on-screen display and minutes and fractions of minutes in the run.smy file and the output of nmmbt. Timing and results will depend on the computer and compiler (results above are with 32 bit gfortran).
 

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 Windows Commmand environment variable nmclean is set to "n". The run directory name is made up from the runname and an extension which by default is .nm7 e.g. theopd.nm7.

Note: If the WFN compilation size system is used then the run directory name will reflect the compilation size e.g. if the regular size is used the run directory will be theopd.reg.

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

nmpathlist.txt

Paths used by compiler and MPI

.coi,.cor..cov,.cpu,.ext,.phi,.shk,.shm,.xml

Miscellaneous NONMEM output files

Runname_mpi.log

message passing interface log file if mpi is used

Using Monolix

mlxgo and mlxbs commands can be used to run Monolix (tested with version 4.2.2) if a Monolix control file is provided instead of an NM-TRAN control file. Control files with the extension .mlxtran will be passed to Monolix. Monolix control files may refer to data, model, algorithm, and graphics files. In addition to standard Monolix output a WFN smy file is created. The mlxmbt command may be used to summarize Monolix results.

The mlxbs and nmgosim commands gives Monolix users the opportunity to perform non-parametric and parametric bootstraps. For parametric bootstraps the simulated data is created using a NM-TRAN control file and the estimation step is performed using a Monolix control file (with .,mlxtran extension).

wfn.bat has to be modified to set the MONOLIX and MONOLIXDATA paths. The username in MONOLIXDATA should be a Windows user name. See %WFNHOME%\run\wfn.txt for an example of where to set these variables.

set MONOLIX=C:\Monolix\Monolix422\Monolix\monolix422s

set MONOLIXDATA="C:\Documents and Settings\username\monolixData"

Monolix examples are provided in the %WFNHOME%\run\mlx folder. The batch file gomlx.bat may be used to run NONMEM and Monolix examples using the same data and similar models.

Note that data files for use with Monolix by default are assumed to be in comma separated value (CSV) format. A different separator can be defined using the NMSEP environment variable e.g.

set NMSEP=;

will use the semi-colon as a separator in the data file.

 

WFN Commands

A list of WFN commands and how to use them can be found in Commands.

 

Home | Installation | Control Streams | Bootstrap | Randomization Test | Visual Predictive Check | Autocovariate | Files | References