102  Single-Subject Analysis using Population with Unconstrained ETAs (NM73)

Introduction to NONMEM 7.6.0

Author

Robert J. Bauer

Published

June 1, 2025

By default, NONMEM performs single-subject analysis by supposing that the data of the entire data file is from one subject, implied by the lack of an ID item, and lack of a $SIGMA record, but presence of a $OMEGA record. The help manual demonstrates another means by which one data file may contain data from all subjects to be separately analyzed, using ID item as a parsing parameter over multiple single-subject problems. The RECS=ID option is used for this purpose, as given by the following example, ..\examples\indestb.ctl:

$PROB THEOPHYLLINE POPULATION DATA; Analysis of Individuals
; Modification of CONTROL5 control steam
$INPUT  ID DOSE=AMT TIME CP=DV WT
$DATA   THEOPP RECS=ID
;RECS=ID: Data set will be read until ID changes or end-of-file
$SUBROUTINES ADVAN2

$PK
;THETA(1)=MEAN ABSORPTION RATE CONSTANT (1/HR)
;THETA(2)=MEAN ELIMINATION RATE CONSTANT (1/HR)
;THETA(3)=SLOPE OF CLEARANCE VS WEIGHT RELATIONSHIP (LITERS/HR/KG)
;SCALING PARAMETER=VOLUME/WT SINCE DOSE IS WEIGHT-ADJUSTED
     CALLFL=1
     KA=THETA(1)
     K=THETA(2)
     CL=THETA(3)
     SC=CL/K

$THETA (0.001,3) (0.001,.2) (0.001,.1)
$OMEGA .2
;For single subject data OMEGA is residual variance.

$ERROR
     Y=F+ERR(1)
;ERR must be used instead of EPS.

$EST MAXEVAL=450 PRINT=5

$COV SPECIAL MATRIX=R PRINT=E
;SPECIAL is required to obtain the variance-covariance matrix for single-subject data.

$TABLE ID DOSE WT TIME NOPRINT ONEHEADER FILE=indestb.tab NOTITLE

$TABLE ID KA K CL SC NOPRINT FIRSTONLY NOAPPEND FILE=indestb.par NOTITLE ONEHEADER

INCLUDE indestb.txt 11
; INCLUDE: Inserts copies of the file named indestb.txt for each additional individual.

which performs the analysis for the first subject, and the accompanying include file performs analysis on the subsequent subjects:

$PROB THEOPHYLLINE POPULATION DATA; Analysis of Individuals

$INPUT  ID DOSE=AMT TIME CP=DV WT

$DATA   THEOPP RECS=ID NOREWIND
;NOREWIND: data set will be read starting after the previous individual

$THETA (0.001,3) (0.001,.2) (0.001,.1)
$OMEGA .2
;For single subject data OMEGA is residual variance

$EST MAXEVAL=450 PRINT=5

$COV SPECIAL MATRIX=R PRINT=E
;SPECIAL is required to obtain the variance-covariance matrix for single-subject data

$TABLE ID DOSE WT TIME NOPRINT FORWARD NOHEADER FILE=indestb.tab

$TABLE ID KA K CL SC NOPRINT FIRSTONLY FORWARD NOAPPEND NOHEADER
FILE=indestb.par

1 Unconstrained-etas method (NM73)

Another method now available in NM73 is for NONMEM to treat all the subjects as part of a population analysis, but if all OMEGA diagonals are set to 1.0E+06 FIXED, this is a key value to indicate to NONMEM that there is no population density constraint for etas associated with the posterior density, effectively making the posterior density strictly a data likelihood. In the following example, the indestb problem was restructured to implement this method, as shown here in ..\examples\indestm.ctl:

$PROB THEOPHYLLINE POPULATION DATA

$INPUT  ID DOSE=AMT TIME CP=DV WT
$DATA   THEOPP
$SUBROUTINES ADVAN2

$PK
;THETA(1)=MEAN ABSORPTION RATE CONSTANT (1/HR)
;THETA(2)=MEAN ELIMINATION RATE CONSTANT (1/HR)
;THETA(3)=SLOPE OF CLEARANCE VS WEIGHT RELATIONSHIP (LITERS/HR/KG)
;SCALING PARAMETER=VOLUME/WT SINCE DOSE IS WEIGHT-ADJUSTED
     CALLFL=1
     KA=THETA(1)+ETA(1)
     K=THETA(2)+ETA(2)
     CL=THETA(3)+ETA(3)
     SC=CL/K

$THETA (0.0 FIXED)X4
$OMEGA (1.0E+06 FIXED)X4
$ETAS 3 .08 .04 0.2

$ERROR
     W1=SQRT(ABS(THETA(4)+ETA(4)))
     IPRED=F
     Y=F+W1*EPS(1)

$SIGMA (1.0 FIXED)

$EST METHOD=1 INTERACTION LAPLACE MAXEVAL=0 PRINT=5 NOHABORT FNLETA=0 MCETA=1 NONINFETA=1

$TABLE      ID DOSE TIME DV IPRED W1 NOAPPEND NOPRINT FILE=INDESTM.TAB

$TABLE      ID KA K CL NOAPPEND FIRSTONLY NOPRINT FILE=INDESTM.PAR

Notice in the above example that OMEGA diagonals are set to 1.0E+06, telling NONMEM to report the objective function of each subject as a data likelihood, without an eta population density or an integral over all etas component added. This is called POPULATION WITH UNCONSTRAINED ETAS analysis, versus the standard SINGLE-SUBJECT or POPULATION, and will be labeled as such in the NONMEM report file under ANALYSIS TYPE. For this example, all THETAs are fixed to 0 as well, so that the etas contain the full values of the individual parameters to which they are associated (KA, K, CL, and residual variance W1 squared). Since THETAs are no longer in play in indestm, initial etas become relevant, so the $ETAS record is used to introduce them, and MCETA=1 assures that these initial etas (as well as etas=0) are tested at the beginning of the etas curve fitting (the MAP estimation) as viable starting positions. Also, since all of the traditional population parameters THETAS, SIGMAS, and OMEGAS are fixed, only a single evaluation (MAXEVAL=0) is necessary. To compare the results of indestm with those of indestb, note that the four etas in indestm.phi match with the final three theta parameters and OMEGA(1,1) listed in indestb.ext or indestb.res, and notice that the individual objective functions of subjects listed in indestm.phi match with the final objective function of each of the 12 single-subject analyses in indestb.ext. Furthermore, the variance-covariance etas (ETC(*,*)) listed in indestm.phi match with the variance-covariance of the THETAs and OMEGA(1,1) in indestb.cov. The perfect match of the variance between indestm and indestb was done by ensuring both performed 2nd derivative information matrix analyses, in indestm by selecting LAPLACE in the $EST step, and in indestb by selecting MATRIX=R in the $COV step.

One can also use the equivalent $EST statement (which can sometimes provide more accurate results, particularly if residual error is heteroscedastic):

$EST METHOD=1 INTERACTION MAXEVAL=0 PRINT=5 NOHABORT FNLETA=0 MCETA=1 ETADER=3

What adds power to this technique over the typical single-subject analysis method is that some of the parameters may be shared. For example, in ..\examples\indestms.ctl, instead of each subject finding its own residual variance coefficient, a shared SIGMA(1,1) is estimated:

$PROB THEOPHYLLINE POPULATION DATA

$INPUT      ID DOSE=AMT TIME CP=DV WT
$DATA       THEOPP
$SUBROUTINES ADVAN2

$PK
;THETA(1)=MEAN ABSORPTION RATE CONSTANT (1/HR)
;THETA(2)=MEAN ELIMINATION RATE CONSTANT (1/HR)
;THETA(3)=SLOPE OF CLEARANCE VS WEIGHT RELATIONSHIP (LITERS/HR/KG)
;SCALING PARAMETER=VOLUME/WT SINCE DOSE IS WEIGHT-ADJUSTED
     CALLFL=1
     KA=THETA(1)+ETA(1)
     K=THETA(2)+ETA(2)
     CL=THETA(3)+ETA(3)
     SC=CL/K

$THETA (0.0 FIXED)X3
$OMEGA (1.0E+06 FIXED)X3
$ETAS 3 .08 .04

$ERROR
     IPRED=F
     Y=F+EPS(1)

$SIGMA 0.2

$EST METHOD=1 INTERACTION LAPLACE MAXEVAL=9999 PRINT=1 NOHABORT FNLETA=0 MCETA=1

$TABLE           ID DOSE TIME DV IPRED NOAPPEND NOPRINT FILE=INDESTMS.TAB

$TABLE           ID KA K CL NOAPPEND FIRSTONLY NOPRINT FILE=INDESTMS.PAR

$COV MATRIX=R

Thus, while each subject finds its own K, KA, and CL in the form of unconstrained etas as is done in indestm.ctl, a single residual variance as SIGMA(1,1) is estimated across subjects for indestms. For this analysis, a re-iterative analysis to improve SIGMA must be performed, so MAXEVAL>0 must be set. Non-zero THETAS may also be introduced to provide additional shared parameters, as is done in standard population analysis.

Please note that when using this POPULATION WITH UNCONSTRAINED ETAS analysis, NM-TRAN still sees the data as population, and will declare it as such in its warning statements. NMTRAN/NONMEM process the problem as population, while the statistical algorithms treat the data as single-subject (at least concerning unconstrained etas), offering the best of both worlds. Thus, NONMEM is capable of parallelizing these problems. The traditional single-subject analysis, however, cannot be parallelized because NONMEM processes each subject in sequence.