Section 9. Random Effects in GLM, MIXED, and NLMIXED Definition of a Random Effect Before entering a factor on a RANDOM statement be sure to understand the difference between a fixed and a random effect. Fixed effects were defined in Section 6, that is, the levels of the factors chosen are the only ones of interest. A factor is considered random when the levels chosen represent a "random" selection from a much larger population of equally acceptable levels. The definition implies that the chosen "values" are a sample of interchangeable individuals or conditions. That is, they represent an arbitrary realization from a much larger set of other equally acceptable values. Elements of the design structure, e.g., the blocks in a completely randomized block design, are most often treated as random effects. Blocks are only a subset of the larger set of blocks over which inference is to be made. In repeated measures studies on humans or animals, the individual subject is generally treated as a random effect since it is likely the researcher could identify other persons or animals which would have been acceptable for the study. One assumes there is no interaction among elements of the design structure and elements of the treatment structure. The RANDOM Statement The syntax for random effects as entered on the RANDOM statements in both PROC GLM and PROC MIXED look very much alike other than how the specification of random effects appear on the MODEL and RANDOM statements. As an example, if one observation is to be obtained from male and female subjects (gender) and they are selected from a set of randomly chosen sites, the effect of site is likely considered random when many other sites are possible. A comparison of the commands for PROCs GLM and MIXED indicates one distinct difference: PROC GLM DATA=ex; PROC MIXED DATA=ex TYPE=reml; CLASS site gender; CLASS site gender; MODEL y = gender site / solution; MODEL y = gender / solution; RANDOM site; RANDOM site; RUN; RUN; Notice that in both procedures the variable names for site and gender appear on the CLASS statement. With PROC GLM variables that are treated as random effects are placed on both the MODEL and RANDOM statements; in PROC MIXED they only appear on the RANDOM statement. The equivalent SPSS random effects model is: MIXED y BY site gender /FIXED = gender | SSTYPE(3) /METHOD = REML /PRINT = SOLUTION /RANDOM site | COVTYPE(VC) . When Should One Treat Variables as Random Effects? Random effects models work well when the responses are more similar within a site than between sites. This indicates a larger between-site variance relative to the within-site variance. Less variation between sites than within sites leads to nonconvergence since they may produce negative variance estimates. If that is the problem, then specifying NOBOUND on the PROC statement, which might achieve convergence. PROC MIXED DATA=ex TYPE=reml NObound; Etc.. Run;