WFN Files

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

 

Last Updated: 28 November 2014

WFN Command Files are intended for direct command line use. WFN Support Files are used by the command files and are not typically useful by themselves.

WFN Environment Variables

Some environment variables may be set by the user either at the command line or in wfn.bat to reflect user preferences.

NMNICE If set to y then NONMEM will run at low priority. This has negligible impact on actual run-times but allows more system responsiveness to user actions.

NMRAW If set to y then WFN will report the variance of OMEGA and SIGMA estimates. The default output for standard errors of OMEGA and SIGMA is to report the relative standard error as OMEGA:se% and SIGMA:se%. This is obtained by dividing the standard error by NONMEM’s estimate of the variance of OMEGA or SIGMA. An alternative output with an approximation to the relative standard error of the sqrt(variance) of OMEGA and SIGMA can be obtained by setting the environment variable nmraw to include the characters “SD” e.g.

set nmraw=SD

http://www.mail-archive.com/nmusers@globomaxnm.com/msg00845.html

http://www.mail-archive.com/nmusers@globomaxnm.com/msg00847.html

 

F77TRACE The standard NONMEM group installation creates an nmfe7.bat file with the compiler options set in the environment variable op. It includes a run time /traceback option that slows down execution by about 10% and has little value for users. The WFN Fortran compiler options do not include this option by default. It can be activated by setting the environment variable F77TRACE=y in wfn.bat.

 

WFN Command Files

MLXGO.BAT This is the equivalent of nmgo.bat for use with Monolix. The control file argument must have the extension .mlxtran. The extension is not required on the command line when mlxgo.bat is used.

 

mlxgo MLX_warfpk

 

MLXBS.BAT This is the equivalent of nmbs.bat for use with Monolix. The control file argument must have the extension .mlxtran. The extension is not required on the command line when mlxbs.bat is used.

 

mlxbs MLX_warfpk 100

 

MLXMBT.BAT This is the equivalent of nmmbt.bat for use with Monolix.  Note that the likelihood calculated by Monolix is not directly comparable with the objective function value calculated by NONMEM. When Monolix is asked to compute the log likelihood it adds a constant term equal to Obs*ln(2*pi) that is not added by NONMEM. The Monolix derived “Obj” value reported by the mlxmbt command can be converted to the equivalent value computed by NONMEM by subtracting Obs*ln(2*pi) from the Monolix value. Unfortunately Monolix does not save the number of observations (Obs) so this cannot currently be done automatically by mlxmbt.

 

NMAC.BAT Automatic search for covariate model. Requires an autocovariate control stream that includes all the covariate models that are to be tested. A stepwise forward inclusion search is performed with inclusion of a covariate if it improves the objective function by at least 3.84. The full model is then pruned by removing covariates one at a time with replacement and only covariates which produce at least a 10.83 change in objective function are accepted for the final model.

e.g. The following command uses the theoe0.ctl autocovariate control stream and systematically explores the five covariates shown. If more than 9 covariates are specified then they must be written as a single string joined by # characters e.g. AGE#WT#SEX#RACE#DIAG

nmac theoe0 AGE WT SEX RACE DIAG

 

NMBS.BAT Performs a bootstrap of a NONMEM run. eg. nmbs theopd 100 will invoke nmgo with 100 bootstrap sampled data sets taken from theopd.dat. The output is saved in runname.bs.%NMDIR%\runname.bs.smy e.g. theopd.bs.nm7\theopd.bs.smy. Assumes that the value of the IGNORE option for $DATA is #. If another value is used then you must set nmignore to the desired IGNORE character. Note that you cannot use IGNORE=@ with nmbs. Several executions of nmbs can be run in parallel starting from the same directory but ONLY if the runname is different. E.g. you might copy theopd.ctl theopd2.ctl and then run nmbs theopd 1 500 and nmbs theopd2 501 1000 at the same time.

nmbs theopd 200; run from 1 to 200 bootstraps

nmbs theopd 1 200 ; run from 1 to 200 bootstrap data sets

nmbs theopd 5 5 ; just run the 5th bootstrap data set

nmbs theopd 501 1000 ; run from 501 to 1000 bootstrap data sets

 

NMBSI.BAT Similar to nmbs.bat but uses NONMEM $SIM BOOTSTRAP=-1 option to generate bootstrap data sets.

nmbsi theopd 200; run from 1 to 200 bootstraps using NONMEM to generate bootstrap data sets

 

NMBSSXS.BAT It is a common problem when running bootstraps that some runs fail with a variety of termination messages. The nmbssxs command can be used to count and summarize the success and failure of runs following the use of nmbs. Run nmbssxs  in a directory containing a runname.bs directory created by nmbs to obtain a summary of the results.

 

NMCG.BAT Creates CrossGraphs files from NONMEM table output.

 

NMCTL.BAT Takes final parameter estimates from runname.lst file and puts them in the original control stream. e.g. nmctl theopd. The original control stream will be named theopd.org.

If used with the BCV option e.g. nmctl runname BCV the control stream will be formatted for use with the user defined PRIOR subroutine which applies a Bayesian prior to the parameters. BCV may be the letter "b" or a number between 0 and 1 to indicate the fractional coefficient of variation to use as the default value for defining the prior uncertainty on THETA. The number form is used if the run did not include a covariance step or the covariance step failed and the estimated standard errors on THETA are not defined.

The second argument to nmctl can be the letter "i" to specify that parameter values should be read from INTER.txt e.g. nmctl runname i

This is helpful if a run terminates unexpectedly and the NONMEM output listing is not created properly. Using nmctl  will retrieve the parameter estimates obtained so far from INTER.txt. INTER.txt is only created if the MSFO option is specified and BLKDAT is changed to rename the intermediate output file from the default value of INTER to INTER.txt i.e.

1/'nul','con','PRDERR','INTER.txt','nul'/

 

NMEIGEN.BAT Displays the condition number and the extreme eigenvalues. This requires that $COV has the PRINT=E option and that the covariance step completes. A condition number over 1000 is a sign of overparameterization e.g. the condition number for the theopd example is 36.8 which suggests the model is not overparameterized.

nmeigen theopd_eigen
theopd_eigen cond=36.8159 6.03E-02 2.22E+00

 

NMFE5.BAT This is called similarly to the standard NONMEM nmfe5.bat but uses WFN to run NONMEM. If it placed in a directory on the system path e.g. C:\Windows then it can be used by programs such as NextLevelSolutions bootstrap. The user should edit nmfe5.bat to makes sure it starts by calling wfn.bat using the same arguments that are used with the normal WFN shortcut method of starting WFN.

nmfe5 theopd.ctl theopd.lst

NMINT.BAT Displays intermediate THETA values during NONMEM run (wc) e.g. nmint runnname. Use of this command requires that the $ESTIMATION record includes the MSFO=runname.msf option. This is because an intermediate output file is only produced if the MSFO option is in effect.

NMGO.BAT Invokes NONMEM run with runname control stream argument e.g. nmgo theopd

 

NMGOSIM.BAT Combines simulation and estimation which may be used for performing a parametric bootstrap. It uses a simulation control stream (simctl) to generate a specified number (nrep) of simulated data sets. Each data set is then used by an estimation control stream (estctl). The parameter estimates from all nrep runs are saved in a single file (estctl.smy) in the estctl run directory e.g. nmgosim simctl estctl 1000

 

This command will simulate and estimate 1000 data sets. Note that the simulation control stream must create a table file with data items that match the data items input by the estimation control stream. The nmgosim procedure will replace the $DATA file in the estimation control stream with each simulated data set so that it can be used for estimation. It is recommended (but not necessary) that the $TABLE NOAPPEND option be used in the simulation control stream to prevent creation of the PRED, RES and WRES data items that are usually not used by the estimation control stream.

nmgosim.bat provides a work around for NONMEM unreliable simulation and estimation steps when they are combined in a single problem. When using nmgosim to perform a parametric bootstrap the default is to request NONMEM to simulate the required number of replications using a data file representing one replication. Because of the way NONMEM re-uses the previous simulated dataset for each sub-problem it may sometimes be difficult to simulate with more than 1 subproblem. In these cases, setting the NSUBPROBLEM environment variable to 1 will set the $SIMULATION option NSUB to the value of NSUBPROBLEM instead of the number or replications. The user should supply a data file containing the required total number of replication instances.

The NONMEM table file produced by the simulation step may be transformed into a different format suitable for the estimation step. For example the simulation step may produce both concentration and effect observations. The data may be analysed by in two steps with and without the effect observations. This requires the use of an awk script to perform the transformation of each replication data file. The awk script file name and path should be specified in the fixdat environment variable.  Because nmgosim creates a subdirectory for the data files it is usually necessary to specify the parent path (either a fully qualified or a relative path may be used). If arguments are required these may be specified in the fixarg environment variable. e.g.

set fixdat=..\fixdat.awk

set fixarg= -v PK=1 –v PD=0

rem Replace raw simulated .csv with transformed data

set gotsampascsv=n

rem Keep data after simulation

set ctsthisgotdata=n

call nmgosim pkpdsimctl pkestctl 1000

 

set fixarg= -v PK=1 –v PD=1

rem Use transformed data .csv

set gotsampascsv=y

rem Use previously simulated data

set ctsthisgotdata=y

call nmgosim pkpdsimctl pkpdestctl 1000

 

A Monolix control file (with the .mlxtran) extension may be used for estimation. Simulation must be performed with a NM-TRAN control file. The following example uses NONMEM with the NM_warfpk_sim.ctl file to simulate  1000 data sets which is then followed by estimation using Monolix with the MLX_warfpk_pbs.mltran control file.

 

call nmgosim NM_warfpk_sim.ctl MLX_warfpk_pbs.mlxtran 1000

 

NMLST.BAT Displays list of all run summaries from *.smr files.

NMLLP.BAT Creates and executes a series of runs with a specified parameter fixed to each of a set of user specified values. Can be used to create a log likelihood profile. Usage is nmllp runname pname val1 val2 ... e.g. nmllp theopd pope0 -100 0 100.1 150 200. Because of compiler restrictions on file names the resulting runnames will have any decimal points in parameter values replaced by "p". In the previous example the parameter value of 100.1 will have a runname of theopd_pope0100p1.

NMMBT.BAT Creates model building table. This is a combination of nmobj and *.smy file results. Merges parameter estimates from all runs into a single table. Accounts for different names for parameters. Tab delimited format makes it suitable for reading into Excel. Standard errors can be included by setting the nmmbtse environment variable e.g. set nmmbtse=y before running nmmbt.

NMMSF.BAT Converts full control stream to use MSFI file e.g. nmmsf theopd

NCABS.BAT Works like nmbs.bat but performs a non-compartmental analysis instead of calling NONMEM with the bootstrap data sets. The control stream used with ncabs is used to only identify a dataset containing id, time, concentration and mdv values. This dataset is used to create non-parametric bootstrap datasets. The nca.awk script should be edited to specify a variety of parameters to control the nca computation. Look at %wfnhome%\bin\nca.awk for details. The nca results are put in a directory with the .nca extension. Statistics computed are cmax, tmax, auc to infinity, %extrapolated auc, auc 0 to last time and time to reach target concentration. nca.awk  can be modified to perform any kind of analysis on the simulated data sets created by a NM-TRAN simulation control stream. The nature of the analysis will depend on how the user modifies nca.awk.

NCASIM.BAT Works like nmgosim.bat but performs a non-compartmental analysis instead of calling NONMEM with the simulated data sets. The control stream used with ncasim is typically used to create a parametric bootstrap dataset containing id, time, concentration and mdv values. Usage is ncasim runname start end where runname is a simulation control stream and start and end specify the beginning and end replication numbers to be used for simulation of datasets. nca.awk  can be modified to perform any kind of analysis on the simulated data sets created by a NM-TRAN simulation control stream. The nature of the analysis will depend on how the user modifies nca.awk.

NMONE.BAT Creates a tab delimited file with one record per subject e.g. from a NONMEM table file. Assumes the ID data item is in the first field of each record and headings are on the second record. The first argument is the runname. e.g.  nmone theopd.  An output file named runname.txt will be created in the run directory. The tab delimited format is suitable for reading into Excel.

NMOBJ.BAT Displays sorted list of run summary objective function lines

NMRT.BAT Like nmbs this command invokes multiple NONMEM runs. It randomizes a covariate so that the null model of no effect will be true. This can be used to find the probability of the difference in objective function between two models one of which uses the covariate in the model. The syntax is nmrt covname runname nboot e.g.  nmrt sex theopd 1000, where covname is the covariate data item name in the $INPUT record, runname is the name of the NM-TRAN control stream, nboot is the number of replications to be performed. See rtmethod for an example applied to NONMEM and Kelly P. Overview of Computer Intensive Statistical Inference Procedures. http://garnet.acns.fsu.edu/~pkelly/resampling.html for an overview of the randomization test.

 

NMRTSXS.BAT It is a common problem when running bootstraps that some runs fail with a variety of termination messages. The nmrtsxs command can be used to count and summarize the success and failure of runs following the use of nmbs. Run nmrtsxs covname runname in a directory containing a runname.rt_covname directory created by nmrt to obtain a summary of the results.

NMRUNMV.BAT Renames runname control stream, results  directory and associated files e.g. nmrunmv theopd theopdnew

NMTBL.BAT Creates run summary from NONMEM output listing e.g. nmtbl theopd

NTCS.BAT Can do a reverse translation to convert standard control streams to extended control streams by using the -r option. E.g. ntcs -r theopd will convert theopd.ctl. The original control stream will be named theopd.std.
Can also be used to translate exended into standard control streams. e.g. ntcs theopd will convert theopd.ctl. The original control stream will be named theopd.ext.

NMCG.BAT Can be used to make it easier to use CrossGraphs to view NONMEM table file output. See wfncg.htm for details.

UNWFN.BAT Used to uninstall WFN. Must be executed from the %wfnhome% directory.

WFN.BAT Initializes DOS environment variables for specific compiler and NONMEM installation.

ITEM2AWK.BAT Utility to create an awk script for reading and reformatting text files e.g. .csv format

NMVPC.BAT Used to create visual predictive checks.  See wfnvpc.htm for details.

 

WFN Support Files

 

_NMBSI.BAT Invoked by nmcmd.bat to execute NONMEM bootstrap using nmbsi.bat.

_NMGO.BAT Invoked by nmcmd.bat to execute NONMEM or Monolix model execution.

_NMGOSIM.BAT Invoked by nmcmd.bat to execute NONMEM or Monolix parametric bootstrap.

ITEM2AWK.AWK Invoked by item2awk.bat

NCA.AWK Invoked by ncabs.bat

NMAC.AWK Invoked by nmac.bat

NMACF.AWK Invoked by nmac.bat

NMARGS.BAT Checks validity of command line arguments.

NMBS.AWK Invokedby nmbs.bat

NMBSINIT.AWK Invokedby nmbs.bat

NMCMD.BAT Controls parallel execution of all modelling commands.

NMCOV.AWK Invoked by nmgo.bat

NMCTL.AWK Invoked by nmctl.bat

NMDET.AWK Computes determinant from standard errors

NMDSC.BAT Creates a CrossGraphs descriptor file from a NONMEM table file. The descriptor file is used by CrossGraphs to display individual plots of predicted and observed values.

NMDSC.AWK Invoked by nmdsc.bat

NMEXEC.BAT Invokes NONMEM executable (wc)

NMFEWC.BAT Invokes NM-TRAN and compile, link steps for NONMEM executable (wc)

NMFEWFN.BAT Invokes NM-TRAN, compile, link and execution of NONMEM 7.2 (ivf,ivf11,gf,g95)

NMFESF.BAT Invokes NM-TRAN, compile, link and execution of NONMEM 7.1 or earlier (ivf,ivf11,gf,g95,g77)

NMFENMQUAL.BAT Invokes NM-TRAN, compile, link and execution of NONMEM with nmqual (ivf, ivf11, df, g77)

NMINT.AWK Invoked by nmint.bat

NMFIXCTL.AWK Invoked by nmgo.bat

NMG42.BAT Processes autocovariate control stream and creates covariate specific control stream.

NMG42.AWK Invoked by nmg42.bat

NMHDR.AWK Invoked by nmtbl.bat

NMLINK.AWK Invoked by nmfewc.bat

NMLST.AWK Invoked by nmtbl.bat

NMEXTLST.AWK Invoked by nmobj.bat and nmlst.bat

NMMSF.AWK Invoked by nmmsf.bat

NMOBJ.AWK Invoked by nmtbl.bat

NMOTBL.AWK Invoked by nmtbl.bat

NMOVER.BAT Finishes up after NONMEM run.

NMTBL.AWK Invoked by nmtbl.bat

NMVPC2R.AWK Invoked by nmvpc.bat

NTCS.AWK Invoked by nmgo.bat to translate extended control stream to standard control stream.

NMTIME.AWK Invoked by nmfewc.bat and nmfesf.bat and nmover.bat to compute run times

NMLINKDF.FOR Source for Digital Visual Fortran to create nmlinkdf.exe. This allows more flexible location of object files.

NMVPC_FUNCTIONS.R Used by nmvpc.bat

VPC.R Used by nmvpc.bat

NMCR.TXT Used to provide a carriage return for DOS date and time commands

GAWK.EXE The fundamental tool used by WFN to process files

ZIP.EXE and UNZIP.EXE File archive utilities.

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