The NLMIXED Procedure

Modeling Assumptions and Notation

PROC NLMIXED operates under the following general framework for nonlinear mixed models. Assume that you have an observed data vector bold y Subscript i for each of i subjects, i equals 1 comma ellipsis comma s. The bold y Subscript i are assumed to be independent across i, but within-subject covariance is likely to exist because each of the elements of bold y Subscript i is measured on the same subject. As a statistical mechanism for modeling this within-subject covariance, assume that there exist latent random-effect vectors bold u Subscript i of small dimension (typically one or two) that are also independent across i. Assume also that an appropriate model linking bold y Subscript i and bold u Subscript i exists, leading to the joint probability density function

p left-parenthesis bold y Subscript i Baseline vertical-bar bold upper X Subscript i Baseline comma bold-italic phi comma bold u Subscript i Baseline right-parenthesis q left-parenthesis bold u Subscript i Baseline vertical-bar bold-italic xi right-parenthesis

where bold upper X Subscript i is a matrix of observed explanatory variables and bold-italic phi and bold-italic xi are vectors of unknown parameters.

Let bold-italic theta equals left-bracket bold-italic phi comma bold-italic xi right-bracket and assume that it is of dimension n. Then inferences about bold-italic theta are based on the marginal likelihood function

m left-parenthesis bold-italic theta right-parenthesis equals product Underscript i equals 1 Overscript s Endscripts integral p left-parenthesis bold y Subscript i Baseline vertical-bar bold upper X Subscript i Baseline comma bold-italic phi comma bold u Subscript i Baseline right-parenthesis q left-parenthesis bold u Subscript i Baseline vertical-bar bold-italic xi right-parenthesis d bold u Subscript i Baseline

In particular, the function

f left-parenthesis bold-italic theta right-parenthesis equals minus log m left-parenthesis bold-italic theta right-parenthesis

is minimized over bold-italic theta numerically in order to estimate bold-italic theta, and the inverse Hessian (second derivative) matrix at the estimates provides an approximate variance-covariance matrix for the estimate of bold-italic theta. The function f left-parenthesis bold-italic theta right-parenthesis is referred to both as the negative log likelihood function and as the objective function for optimization.

As an example of the preceding general framework, consider the nonlinear growth curve example in the section Getting Started: NLMIXED Procedure. Here, the conditional distribution p left-parenthesis bold y Subscript i Baseline vertical-bar bold upper X Subscript i Baseline comma bold-italic phi comma u Subscript i Baseline right-parenthesis is normal with mean

StartFraction b 1 plus u Subscript i Baseline 1 Baseline Over 1 plus exp left-bracket minus left-parenthesis d Subscript i j Baseline minus b 2 right-parenthesis slash b 3 right-bracket EndFraction

and variance sigma Subscript e Superscript 2; thus bold-italic phi equals left-bracket b 1 comma b 2 comma b 3 comma sigma Subscript e Superscript 2 Baseline right-bracket. Also, u Subscript i is a scalar and q left-parenthesis u Subscript i Baseline vertical-bar xi right-parenthesis is normal with mean 0 and variance sigma Subscript u Superscript 2; thus xi equals sigma Subscript u Superscript 2.

The following additional notation is also found in this chapter. The quantity bold-italic theta Superscript left-parenthesis k right-parenthesis refers to the parameter vector at the kth iteration, the vector bold g left-parenthesis bold-italic theta right-parenthesis refers to the gradient vector nabla f left-parenthesis bold-italic theta right-parenthesis, and the matrix bold upper H left-parenthesis bold-italic theta right-parenthesis refers to the Hessian nabla squared f left-parenthesis bold-italic theta right-parenthesis. Other symbols are used to denote various constants or option values.

Nested Multilevel Nonlinear Mixed Models

The general framework for nested multilevel nonlinear mixed models in cases of two levels can be explained as follows. Let bold y Subscript j left-parenthesis i right-parenthesis be the response vector observed on subject j that is nested within subject i, where j is commonly referred as the second-level subject and i is the first-level subject. There are s first-level subjects, and each has s Subscript i second-level subjects that are nested within. An example is bold y Subscript j left-parenthesis i right-parenthesis, which are the heights of students in class j of school i, where j equals 1 comma ellipsis comma s Subscript i Baseline for each i and i equals 1 comma ellipsis comma s. Suppose there exist latent random-effect vectors bold v Subscript j left-parenthesis i right-parenthesis and bold v Subscript i of small dimensions for modeling within subject covariance. Assume also that an appropriate model that links bold y Subscript j left-parenthesis i right-parenthesis and left-parenthesis bold v Subscript j left-parenthesis i right-parenthesis Baseline comma bold v Subscript i Baseline right-parenthesis exists, and if you use the notation bold y Subscript i Baseline equals left-parenthesis bold y Subscript 1 left-parenthesis i right-parenthesis Baseline comma ellipsis comma bold y Subscript s Sub Subscript i Subscript left-parenthesis i right-parenthesis Baseline right-parenthesis, bold u Subscript i Baseline equals left-parenthesis bold v Subscript i Baseline comma bold v Subscript 1 left-parenthesis i right-parenthesis Baseline comma ellipsis comma bold v Subscript s Sub Subscript i Subscript left-parenthesis i right-parenthesis Baseline right-parenthesis, and bold-italic xi equals left-parenthesis bold-italic xi 1 comma bold-italic xi 2 right-parenthesis, the joint density function in terms of the first-level subject can be expressed as

p left-parenthesis bold y Subscript i Baseline vertical-bar bold upper X Subscript i Baseline comma bold-italic phi comma bold u Subscript i Baseline right-parenthesis q left-parenthesis bold u Subscript i Baseline vertical-bar bold-italic xi right-parenthesis equals left-parenthesis product Underscript j equals 1 Overscript s Subscript i Baseline Endscripts p left-parenthesis bold y Subscript j left-parenthesis i right-parenthesis Baseline vertical-bar bold upper X Subscript i Baseline comma bold-italic phi comma bold v Subscript i Baseline comma bold v Subscript j left-parenthesis i right-parenthesis Baseline right-parenthesis q 2 left-parenthesis bold v Subscript j left-parenthesis i right-parenthesis Baseline vertical-bar bold-italic xi 2 right-parenthesis right-parenthesis q 1 left-parenthesis bold v Subscript i Baseline vertical-bar bold-italic xi 1 right-parenthesis

As defined in the previous section, the marginal likelihood function where bold-italic theta equals left-bracket bold-italic phi comma bold-italic xi right-bracket is

m left-parenthesis bold-italic theta right-parenthesis equals product Underscript i equals 1 Overscript s Endscripts integral p left-parenthesis bold y Subscript i Baseline vertical-bar bold upper X Subscript i Baseline comma bold-italic phi comma bold u Subscript i Baseline right-parenthesis q left-parenthesis bold u Subscript i Baseline vertical-bar bold-italic xi right-parenthesis d bold u Subscript i Baseline

Again, the function

f left-parenthesis bold-italic theta right-parenthesis equals minus log m left-parenthesis bold-italic theta right-parenthesis

is minimized over bold-italic theta numerically in order to estimate bold-italic theta. Models that have more than two levels follow similar notation.

Last updated: December 09, 2022