TMODEL Procedure
Example 39.2 Random-Effects Parameter Estimation
(View the complete code for this example.)
This example models the circumference of five orange trees over 1,600 days by using a logistic curve to represent the growth of each tree over time in conjunction with a random-effects parameter that accounts for variation among the trees. The tree data for this example come from Draper and Smith (1981) and are displayed in Output 39.2.1.
Output 39.2.1: Orange Tree Growth Curves

Lindstrom and Bates (1990) and Pinheiro and Bates (1995) propose the following logistic nonlinear mixed model for these data:
Here, represents the jth circumference measurement on the ith tree (
;
);
is the corresponding day;
, and
are the fixed-effects parameters;
are the random-effect parameters assumed to be iid
; and
are the residual errors assumed to be iid
and independent of the
. The random-effect parameters
enter the model linearly.
The following PROC TMODEL step estimates the fixed-effects and random-effect parameters in this model:
proc tmodel data=tree;
parms b1 200
b2 800
b3 800
s2u;
num = b1 + u1;
ex = exp(-(day-b2)/b3);
den = 1 + ex;
y = num/den;
crosssection tree;
fit y;
random u1 ~ normal(0,s2u) / nopsd;
quit;
The four SAS programming statements in this PROC TMODEL step specify the logistic model for tree growth. The variable u1 identifies the random effect in this model.
The CROSSSECTION statement defines a variable that indicates when new realizations of the random effect are encountered in the DATA= data set; in this case the variable tree is used.
The RANDOM statement defines the single random effect to be u1 and specifies that it follow a normal distribution with mean 0 and variance s2u. For models that have a nonlinear dependence on the random-effects variables, you can use the NUMQUADPTS= option to specify the number of Gaussian quadrature points to use in the approximation of the likelihood function. In this example, the model has a linear dependence on u1, so the default (NUMQUADPTS=1) is used.
For this example, as with many nonlinear random-effects models, the parameter optimization is sensitive to the selection of initial estimates. Therefore, in the PARMS statement, the values for the fixed-effects parameters are initialized with values based on a cursory examination of Output 39.2.1 to assure convergence. The parameter b1 represents an asymptotic limit for the circumference of an average tree. The parameters b2 and b3 are characteristic of the growth period for the orange trees.
Output 39.2.2 shows the estimates for the fixed-effects and random-effect parameters together with their standard errors and approximate t-values.
Output 39.2.2: Fixed-Effects and Random-Effect Parameters for the Orange Tree Model
| Nonlinear Random Effects Estimates | ||||
|---|---|---|---|---|
| Parameter | Estimate | Approx Std Err | t Value | Approx Pr > |t| |
| b1 | 192.0205 | 7.3253 | 26.21 | <.0001 |
| b2 | 727.7797 | 4.4848 | 162.28 | <.0001 |
| b3 | 347.8901 | 3.4471 | 100.92 | <.0001 |
| s2u | 377.435 | 64.7305 | 5.83 | <.0001 |