Quick start

Data

About 60 infants were given Phenobarbital therapeutically 1. A plasma concentration was measured in each some hours after the first (loading) dose, followed by multiple maintenance doses. A second, and sometimes a third concentration were measured later. In all, 155 concentrations were observed. The first subject's data is shown below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
      1    0.    25.0    1.4      7      .      1 1
      1    2.0      .    1.4      7   17.3      0 0
      1   12.5    3.5    1.4      7      .      1 1
      1   24.5    3.5    1.4      7      .      1 1
      1   37.0    3.5    1.4      7      .      1 1
      1   48.0    3.5    1.4      7      .      1 1
      1   60.5    3.5    1.4      7      .      1 1
      1   72.5    3.5    1.4      7      .      1 1
      1   85.3    3.5    1.4      7      .      1 1
      1   96.5    3.5    1.4      7      .      1 1
      1  108.5    3.5    1.4      7      .      1 1
      1  112.5      .    1.4      7   31.0      0 0

Model

We use the following NM-TRAN control stream ("examples/pheno") to model the data.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$PROBLEM PHENOBARB  SIMPLE MODEL
$INPUT   ID TIME AMT WGT APGR DV
$DATA    PHENO
$SUBR   ADVAN1 TRANS2
$PK
      TVCL=THETA(1)
      TVV=THETA(2)
      CL=TVCL*EXP(ETA(1))
      V=TVV*EXP(ETA(2))
      S1=V
$THETA  (0,.0105)  (0,1.05)
$OMEGA  .25   .25
$ERROR
      W=F
      Y=F+W*EPS(1)

      IPRED=F         ;  individual-specific prediction
      IRES=DV-IPRED   ;  individual-specific residual
      IWRES=IRES/W    ;  individual-specific weighted residual
$SIGMA  .04
$ESTIMATION   SIGDIGITS=4 POSTHOC
$COVARIANCE
$TABLE      ID WGT APGR TIME AMT CL V ETA1 ETA2 IPRED IWRES
            NOPRINT ONEHEADER FILE=TABLE1

Note that the $INPUT record now defines a new data item, WT, the patient weight. It's value is given on every data record for an individual, in the column indicated. This is so despite the fact that WT may not change within an individual. This is a bit repetitious, but convenient.

  • Control stream line 1 gives the NONMEM problem a name.
  • NONMEM uses ";" for comments, thus everything after ";" one a line is neglected, as shown in line 17-19.
  • Line 2 says that the data file column 1-5 contain subject ID (ID), event time (TIME), dosing amount (AMT), covariate WGT and APGR, and the observed concentrations (dependent value DV), respectively.
  • Line 3 specifies the data file name, PHENO.
  • Line 4 says the model is implemented using ADVAN1, namely the one-compartment (monoexponential) model. No absorption model was needed for this problem because all concentrations were measured many hours after the last (oral) dose, so absorption could be considered to be complete, and for the purposes of data analysis, immediate. TRANS2 says that the parameters of the PK model are Clearance (CL) and Volume of Distribution (V).
  • The code below $PK ($PK block) says that PK parameters, such as CL, are equal to a population typical value parameter (THETA(1)) 2 modified by an ETA(1). ETA's describe interindividual variable variability, the deviation of the individual's PK parameters from the typical values of the population.
  • The code below $ERROR ($ERROR block) describes how the observations DV deviate from the prediction F. Particular in this example line 14-15 says they differ by a proportional residual term.
  • $THETA, $OMEGA, and $SIGMA records specify the initial estimation of the corresponding parameters. In particular, the zeros in (0, .0105) and (0,1.05) specify the THETA parameters are lower-bounded at 0.
  • Line 21 ($ESTIMATION) requests parameter estimation, and line 22 ($COVARIANCE) requests standard error for the estimates.
  • Line 23 uses $TABLE to output tables of the given variables. A problem can have multiple tables output.

Run

Assume the above model is stored in model.ctl 3. We use NONMEM's Front End script nmfe to run the above model. The script in releases often has NONMEM version in its name. For example, with NONMEM v7.6.0, we do the following in command line.

1
nmfe76 model.ctl output.txt

You can see that nmfe requires two arguments, input model file and output plaintext file. In addition it supports many options to control the building and execution behavior. You may refer to its help (nmfe76 --help) printout for details.

Results

The results below are the output of the "FINAL PARAMETER ESTIMATE" page

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
 THETA - VECTOR OF FIXED EFFECTS PARAMETERS   *********
         TH 1      TH 2
         5.48E-03  1.40E+00


 OMEGA - COV MATRIX FOR RANDOM EFFECTS - ETAS  ********
         ETA1      ETA2
 ETA1    6.85E-06
 ETA2    0.00E+00  2.86E-01

 SIGMA - COV MATRIX FOR RANDOM EFFECTS - EPSILONS  ****
         EPS1
 EPS1    8.01E+00

 OMEGA - CORR MATRIX FOR RANDOM EFFECTS - ETAS  *******
         ETA1      ETA2
 ETA1    2.62E-03
 ETA2    0.00E+00  5.34E-01

 SIGMA - CORR MATRIX FOR RANDOM EFFECTS - EPSILONS  ***
         EPS1
 EPS1    2.83E+00

and the "STANDARD ERROR OF ESTIMATE" page.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
 THETA - VECTOR OF FIXED EFFECTS PARAMETERS   *********
         TH 1      TH 2
         4.86E-04  7.86E-02

 OMEGA - COV MATRIX FOR RANDOM EFFECTS - ETAS  ********
         ETA1      ETA2
 ETA1    2.27E-06
 ETA2   .........  8.36E-02

 SIGMA - COV MATRIX FOR RANDOM EFFECTS - EPSILONS  ****
         EPS1
 EPS1    1.49E+00

 OMEGA - CORR MATRIX FOR RANDOM EFFECTS - ETAS  *******
         ETA1      ETA2
 ETA1    4.35E-04
 ETA2   .........  7.82E-02

 SIGMA - CORR MATRIX FOR RANDOM EFFECTS - EPSILONS  ***
         EPS1
 EPS1    2.64E-01

Note that there are estimates of the variances of the interindividual differences in CL (OMEGA - ETA1) and V (OMEGA - ETA2), as well as of the residual error variance (denoted by SIGMA in NONMEM output when the data SIGMA are from a population). There are also standard errors for these estimates.

With the weight (WGT) data, we can improve the above model by using the covariate to explain away some variability of CL and V, by using WGT to regress the typical values:

1
2
3
4
5
6
...
$PK
   TVCL=THETA(1)+THETA(3)*WGT
;# ...
   TVVD=THETA(2)+THETA(4)*WGT
;# ...

The new model's output of estimates:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
 THETA - VECTOR OF FIXED EFFECTS PARAMETERS   *********
         TH 1      TH 2      TH 3      TH 4
         2.70E-05  1.19E-01  4.75E-03  9.19E-01

 OMEGA - COV MATRIX FOR RANDOM EFFECTS - ETAS  ********
         ETA1      ETA2
 ETA1    1.37E-06
 ETA2    0.00E+00  7.51E-02

 SIGMA - COV MATRIX FOR RANDOM EFFECTS - EPSILONS  ****
         EPS1
 EPS1    8.70E+00

 OMEGA - CORR MATRIX FOR RANDOM EFFECTS - ETAS  *******
         ETA1      ETA2
 ETA1    1.17E-03
 ETA2    0.00E+00  2.74E-01

 SIGMA - CORR MATRIX FOR RANDOM EFFECTS - EPSILONS  ***
         EPS1
 EPS1    2.95E+00

and output for the standard errors: of the parameter estimates is

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
 THETA - VECTOR OF FIXED EFFECTS PARAMETERS   *********
         TH 1      TH 2      TH 3      TH 4
         0.00E+00  1.48E-01  2.24E-04  1.13E-01

 OMEGA - COV MATRIX FOR RANDOM EFFECTS - ETAS  ********
         ETA1      ETA2
 ETA1    7.30E-07
 ETA2   .........  3.63E-02

 SIGMA - COV MATRIX FOR RANDOM EFFECTS - EPSILONS  ****
         EPS1
 EPS1    1.71E+00

 OMEGA - CORR MATRIX FOR RANDOM EFFECTS - ETAS  *******
         ETA1      ETA2
 ETA1    3.12E-04
 ETA2   .........  6.63E-02

 SIGMA - CORR MATRIX FOR RANDOM EFFECTS - EPSILONS  ***
         EPS1
 EPS1    2.90E-01

Note the decreases in the sizes of the estimates of the inter-individual variances: with weight in the model, there is less unexplained inter-individual variability.

Note also the very small values estimated for THETA(1) and standard error. In fact the THETA(1) has virtually collapsed to 0. The intercept term of TVCL does not appear to be an important part of the model.

The example highlights:

  • NONMEM has a menu of pharmacokinetic models from which the one appropriate to the problem at hand can be chosen.
  • The user specifies the relationship of pharmacokinetic parameters to independent variables (such as WT in the phenobarbital example), using "population" parameters that will be estimated.
  • The user also specifies which parameters vary between individuals, and the form (model) for this variability, as well as the form (model) for the differences between observations from an individual and their predictions for this individual.
  • NONMEM estimates parameters describing both kinds of variability.
  • NONMEM provides estimates (standard errors) of the precision of its parameter estimates, including those describing variability.

Futher reading

We invite you to go through the User Guide of this documentation to learn more about NONMEM. We also include publication list below. It progresses from beginner to advanced levels.

  • A short guide to get one started with using NONMEM, particularly the FOCE method: NONMEM Tutorial Part I: Description of Commands and Options, With Simple Examples of Population Analysis. CPT Pharmacometrics Syst. Pharmacol. (2019) XX, 1–13. Link.
  • Introduction to Population Pharmacokinetic / Pharmacodynamic Analysis with Nonlinear Mixed Effects Models 1st Edition by Joel S. Owen, Jill Fiedler-Kelly. 2014, John Wiley and Sons, Inc., Hoboken, NJ. ISBN 978-0-470-58229-9.
  • Basic Concepts in Population Modeling, Simulation, and Model-Based Drug Development. DR Mould and RN Upton. CPT: Pharmacometrics & Systems Pharmacology (2012) 1, e6. Link.
  • Basic Concepts in Population Modeling, Simulation, and Model-Based Drug Development—Part 2: Introduction to Pharmacokinetic Modeling Methods. DR Mould and RN Upton CPT: Pharmacometrics & Systems Pharmacology (2013) 2, e38. Link.
  • NONMEM Guide V: Introductory Guide. Chapters 4-11.
  • Basic Concepts in Population Modeling, Simulation, and Model-Based Drug Development: Part 3—Introduction to Pharmacodynamic Modeling Methods. RN Upton1 and DR Mould. CPT Pharmacometrics Syst. Pharmacol. (2014) 3, e88. Link.
  • NMONMEM Guide VI: PREDPP Guide for details of various built-in models and their parameters. See especially chapter VII, sections C.1 through C.18 for the parameter definitions of all the ADVAN’s. Read chapter 3 sections A-E, F.2-F.9, chapter 4 sections A-C, chapter 6 sections C-E for fundamental information of using these ADVAN’s.
  • Short article on the basic theory of estimation methods, and some advanced examples of Expectation-Maximization methods and MCMC Bayesian methods: NONMEM Tutorial Part II: Estimation Methods and Advanced Examples. CPT Pharmacometrics Syst. Pharmacol. (2019) XX, 1–19. Link.
  • NONMEM Guide VIII: Help Guide for the reference to all of the NONMEM options.
  • Introduction to NONMEM 7 for additional options and advanced algorithms.
  • Clinical trial design using $DESIGN: Tutorial for DESIGN in NONMEM: Clinical trial evaluation and optimization. Bauer RJ, Hooker AC, Mentre F. CPT Pharmacometrics Syst Pharmacol. 2021;10:1452–1465. Link.
  • Gibiansky L, Gibiansky E, Bauer R (2012) Comparison of Nonmem 7.2 estimation methods and parallel processing efficiency on a target-mediated drug disposition model. J Pharmacokinet Pharmacodyn 39(1):17–35.
  • Introduction to discrete time and distributed time delay models: Tutorial for Modeling Delays in Biological Systems in the NONMEM Software. Bauer RJ, Krzyzanski W. CPT Pharmacometrics Syst Pharmacol. 2025. Link.

1

NONMEM can also fit single-subject data, see example "examples/control3" for Theophylline plasma concentration-time data and model for a single individual after a single dose of 320 mg.

2

Symols such as THETA, OMEGA, SIGMA are NONMEM's built-in variables. See User Guide and Reference Manual for details.

3

NONMEM model files are text files with .ctl extension. Another popular extension is .mod. In this document we use .ctl.