How to fix an Out of Memory condition or reduce execution time in PROC MIXED or PROC GLIMMIX


The MIXED and GLIMMIX procedures are computationally intensive and execution times can be long. A model may be resource intensive (requiring a large amount of memory or time) if the input data set is large, if the CLASS variables have large numbers of levels, or if certain options are specified in the PROC, MODEL, RANDOM, or REPEATED statements.

If you have a model that encounters an out of memory error or takes too long to run, the following suggestions may be helpful.

Changes to the running environment

Processing by subjects

Choosing options that can affect efficiency

Choosing an alternative procedure

For linear mixed models with thousands of levels for the fixed and/or random effects, or for linear mixed models with hierarchically nested fixed and/or random effects with hundreds or thousands of levels at each level of the hierarchy, the procedure PROC HPMIXED may be used. For more information about this procedure, see the PROC HPMIXED documentation. In SAS Viya, PROC LMIXED enables multithread computing and parallel processing, and can be more numerically efficient. For more information about PROC LMIXED, see the PROC LMIXED documentation.