## Linear random coefficients model 661

Variables patient = patient number, treat = type of factor VIII, time = time in years from start of treatment, cd4_sqrt = square root of CD4 count.

PROC MIXED NOCLPRINT DATA=cd4; CLASS patient treat;

MODEL cd4_sqrt = treat time treat*time / SOLUTION

DDFM=KENWARDROGER; RANDOM INT time / SUBJECT=patient TYPE=UN SOLUTION; TITLE 'SQUARE ROOT OF CD4 COUNTS OVER TIME'; TITLE3 'RANDOM COEFFICIENTS MODEL';

The term INT in the RANDOM statement is a SAS reserved term for an intercept effect.

The use of the RANDOM statement to fit patient and patient-time effects as random coefficients is not immediately obvious. Specification of patient as a SUBJECT effect (SUBJECT = patient) blocks the G matrix by patients and causes interactions between the effects specified (INT and time) and patient to be fitted as random coefficients (hence patient and patient-time are fitted). The TYPE = UN option causes the random coefficients specified to have a multivariate normal distribution (i.e. a general covariance structure). Here, the distribution will be bivariate normal as only two random coefficients are specified.

SQUARE ROOT OF CD4 COUNTS OVER TIME

RANDOM COEFFICIENTS MODEL Iteration History Iteration Evaluations -2 Res Log Like Criterion

0 1 30.49214157

1 3 -828.61051673 0.00283032

2 1 -831.97977353 0.00024121

3 1 -832.24370131 0.00000248

4 1 -832.24627574 0.00000000

Convergence criteria met.

Covariance Parameter Estimates

Cov Parm Subject Estimate

UN(1,1) PATIENT 0.05090

UN(2,1) PATIENT -0.00026

UN(2,2) PATIENT 0.002740

### Residual 0.007347

UN(1,1) and UN(2,2) are the variance component estimates for the patient and patient-time random coefficients. UN(2,1) is the covariance between the random coefficients. Note that the relative sizes of the patient-time variance component cannot be compared directly with the residual because it involves time. In this analysis all the variance components are positive. However, in the situation where a variance component is negative, SAS would not converge and the variance component estimates output from the final iteration would usually show that one variance component estimate was becoming very close to zero.

Fit Statistics

-2 Res Log Likelihood -832.2

AIC (smaller is better) -824.2

AICC (smaller is better) -824.2

BIC (smaller is better) -813.3

Null Model Likelihood Ratio Test DF Chi-Square Pr > ChiSq

Solution for Fixed Effects

Effect

Intercept treat treat TIME

TIME*treat TIME*treat treat Estimate

0.04962 0.01583 0

Standard Error

0.02633 0.04708

0.007597 0.01356

112 112

103 107

 Std Err Effect PATIENT Estimate Pred DF t Value Pr > |t| Intercept 101 0.1983 0. 06494 435 3. 05 0. 0024 TIME 101 0.008769 0. 03049 270 0. 29 0. 7739 Intercept 102 0.2988 0. 05803 506 5. 15 <. 0001 TIME 102 0.03689 0. 02791 336 1. 32 0. 1872 Intercept 103 0.05650 0. 05946 453 0. 95 0. 3426 TIME 103 0.02604 0. 03494 202 0. 75 0. 4570 Intercept 104 0.2385 0. 05872 500 4. 06 <• 0001 TIME 104 -0.00048 0. 02808 331 -0. 02 0. 9864 etc.

Note that the output immediately above has been generated by the use of the SOLUTION option in the RANDOM statement. The intercept and time terms do not give the intercepts and slopes directly. To achieve this, these terms would need to be added to the relevant fixed effects estimates.

Type 3 Tests of Fixed Effects

Effect treat TIME

TIME*treat

Num DF

Den DF

112 107 107

F Value