Fundamental Diagnostics for Two-Level Mixed Models: The SAS ® Macro MIXED_DX

Multilevel modeling has become a common analytic technique across a variety of disciplines including medicine and the social and behavioral sciences. However, because many researchers who use multilevel modeling in their research do not report if the data were screened for potential violations of distributional assumptions and outliers, it is unclear if these diagnostic procedures are being conducted. Thus, in an effort to make the process of checking the assumptions for multilevel models easier for the applied researcher, this paper provides a SAS macro for conducting two-level linear model diagnostics, including examinations of residual normality, linearity, homogeneity of variance, and influential outliers. By utilizing data from PROC MIXED ODS tables, the macro produces box-and-whisker plots, summary tables of statistical output, histograms, and plots of residuals by predicted values. Macro outputs are produced for both level-1 and level-2 data. This paper provides a discussion about the distributional assumptions of mixed models, an example of the macro language, and results from an executed example of the macro. Information for downloading the complete macro is also provided.