RANDOM random-effects ~distribution <options>;
The RANDOM statement specifies which parameters in the model program are random effects and defines their distribution. The statement consists of a list of the random effects, a tilde (~), and then the distribution of the random effects. The RANDOM statement must also be accompanied by a CROSSSECTION statement, which specifies the subject variables. Only one RANDOM statement can be associated with each FIT statement.
The only distribution available for the random effects is normal(m,v), with mean m and variance v. This syntax is illustrated as follows for one effect:
random u ~ normal(0,s2u);
For multiple effects, you should specify bracketed vectors for m and v, the latter consisting of the lower triangular elements of the random-effects variance matrix listed in row order. This is illustrated for two random effects as follows:
random b1 b2 ~ normal([0,0],[g11,g21,g22]);
Similarly, the syntax for three random effects is illustrated as follows:
random b1 b2 b3 ~ normal([0,0,0],[g11,g21,g22,g31,g32,g33]);
The variables that you specify in the CROSSSECTION statement determine the unique realizations of the random effects. The observations for each value of the CROSSSECTION variables must be grouped together in the input data set. PROC TMODEL processes the input data set sequentially and considers an observation to be from a new cross section whenever the values of the CROSSSECTION variables change from the previous observation.
You can specify the following options in the RANDOM statement: