The NLMIXED Procedure

Example 83.1 One-Compartment Model with Pharmacokinetic Data

(View the complete code for this example.)

A popular application of nonlinear mixed models is in the field of pharmacokinetics, which studies how a drug disperses through a living individual. This example considers the theophylline data from Pinheiro and Bates (1995). Serum concentrations of the drug theophylline are measured in 12 subjects over a 25-hour period after oral administration. The data are as follows.

data theoph;
   input subject time conc dose wt;
   datalines;
 1  0.00  0.74 4.02 79.6
 1  0.25  2.84 4.02 79.6
 1  0.57  6.57 4.02 79.6
 1  1.12 10.50 4.02 79.6
 1  2.02  9.66 4.02 79.6
 1  3.82  8.58 4.02 79.6
 1  5.10  8.36 4.02 79.6
 1  7.03  7.47 4.02 79.6

   ... more lines ...   

12 24.15  1.17 5.30 60.5
;

Pinheiro and Bates (1995) consider the following first-order compartment model for these data:

where is the observed concentration of the ith subject at time t, D is the dose of theophylline, is the elimination rate constant for subject i, is the absorption rate constant for subject i, is the clearance for subject i, and are normal errors. To allow for random variability between subjects, they assume

where the s denote fixed-effects parameters and the s denote random-effects parameters with an unknown covariance matrix.

The PROC NLMIXED statements to fit this model are as follows:

proc nlmixed data=theoph;
   parms beta1=-3.22 beta2=0.47 beta3=-2.45
         s2b1 =0.03  cb12 =0    s2b2 =0.4 s2=0.5;
   cl   = exp(beta1 + b1);
   ka   = exp(beta2 + b2);
   ke   = exp(beta3);
   pred = dose*ke*ka*(exp(-ke*time)-exp(-ka*time))/cl/(ka-ke);
   model conc ~ normal(pred,s2);
   random b1 b2 ~ normal([0,0],[s2b1,cb12,s2b2]) subject=subject;
run;

The PARMS statement specifies starting values for the three s and four variance-covariance parameters. The clearance and rate constants are defined using SAS programming statements, and the conditional model for the data is defined to be normal with mean pred and variance s2. The two random effects are b1 and b2, and their joint distribution is defined in the RANDOM statement. Brackets are used in defining their mean vector (two zeros) and the lower triangle of their variance-covariance matrix (a general matrix). The SUBJECT= variable is subject.

The results from this analysis are as follows.

Output 83.1.1: Model Specification for One-Compartment Model

The NLMIXED Procedure

Specifications
Data SetWORK.THEOPH
Dependent Variableconc
Distribution for Dependent VariableNormal
Random Effectsb1 b2
Distribution for Random EffectsNormal
Subject Variablesubject
Optimization TechniqueDual Quasi-Newton
Integration MethodAdaptive Gaussian Quadrature


The "Specifications" table lists the setup of the model (Output 83.1.1). The "Dimensions" table indicates that there are 132 observations, 12 subjects, and 7 parameters. PROC NLMIXED selects 5 quadrature points for each random effect, producing a total grid of 25 points over which quadrature is performed (Output 83.1.2).

Output 83.1.2: Dimensions Table for One-Compartment Model

Dimensions
Observations Used132
Observations Not Used0
Total Observations132
Subjects12
Max Obs per Subject11
Parameters7
Quadrature Points5


The "Parameters" table lists the 7 parameters, their starting values, and the initial evaluation of the negative log likelihood using adaptive Gaussian quadrature (Output 83.1.3). The "Iteration History" table indicates that 10 steps are required for the dual quasi-Newton algorithm to achieve convergence.

Output 83.1.3: Starting Values and Iteration History

Initial Parameters
beta1beta2beta3s2b1cb12s2b2s2Negative
Log
Likelihood
-3.220.47-2.450.0300.40.5177.789945

Iteration History
IterationCallsNegative
Log
Likelihood
DifferenceMaximum
Gradient
Slope
17177.77620.0136972.87337-63.0744
211177.76430.0119481.69814-4.75239
314177.75730.0070361.29744-1.97311
417177.75570.0015761.44141-0.49772
520177.74670.0089881.13228-0.82230
624177.74640.0002990.83129-0.00244
727177.74630.0000830.72420-0.00789
831177.74570.0005780.18002-0.00583
934177.74573.88E-60.017958-8.25E-6
1037177.74573.222E-80.000143-6.51E-8

NOTE: GCONV convergence criterion satisfied.


Output 83.1.4: Fit Statistics for One-Compartment Model

Fit Statistics
-2 Log Likelihood355.5
AIC (smaller is better)369.5
AICC (smaller is better)370.4
BIC (smaller is better)372.9


The "Fit Statistics" table lists the final optimized values of the log-likelihood function and information criteria in the "smaller is better" form (Output 83.1.4).

The "Parameter Estimates" table contains the maximum likelihood estimates of the parameters (Output 83.1.5). Both s2b1 and s2b2 are marginally significant, indicating between-subject variability in the clearances and absorption rate constants, respectively. There does not appear to be a significant covariance between them, as seen by the estimate of cb12.

Output 83.1.5: Parameter Estimates for One-Compartment Model

Parameter Estimates
ParameterEstimateStandard
Error
DFt ValuePr > |t|95% Confidence LimitsGradient
beta1-3.22680.0595010-54.23<.0001-3.3594-3.0942-0.00009
beta20.48060.1989102.420.03630.037450.92383.645E-7
beta3-2.45920.0512610-47.97<.0001-2.5734-2.34490.000039
s2b10.028030.01221102.300.04460.0008280.05524-0.00014
cb12-0.001270.0340410-0.040.9710-0.077120.07458-0.00007
s2b20.43310.2005102.160.0561-0.013540.8798-6.98E-6
s20.50160.06837107.34<.00010.34930.65406.133E-6


The estimates of , , and are close to the adaptive quadrature estimates listed in Table 3 of Pinheiro and Bates (1995). However, Pinheiro and Bates use a Cholesky-root parameterization for the random-effects variance matrix and a logarithmic parameterization for the residual variance. The PROC NLMIXED statements using their parameterization are as follows, and results are similar.

proc nlmixed data=theoph;
   parms ll1=-1.5 l2=0 ll3=-0.1 beta1=-3 beta2=0.5 beta3=-2.5 ls2=-0.7;
   s2   = exp(ls2);
   l1   = exp(ll1);
   l3   = exp(ll3);
   s2b1 = l1*l1*s2;
   cb12 = l2*l1*s2;
   s2b2 = (l2*l2 + l3*l3)*s2;
   cl   = exp(beta1 + b1);
   ka   = exp(beta2 + b2);
   ke   = exp(beta3);
   pred = dose*ke*ka*(exp(-ke*time)-exp(-ka*time))/cl/(ka-ke);
   model conc   ~ normal(pred,s2);
   random b1 b2 ~ normal([0,0],[s2b1,cb12,s2b2]) subject=subject;
run;