Incorrect NORMALTEST and PNORMAL inset values in comparative plots in PROC UNIVARIATE


When the NORMALTEST and PNORMAL options are specified on an INSET statement for a comparative plot in PROC UNIVARIATE, incorrect results for the Shapiro-Wilk's W test statistic and its p-value are displayed in every cell except the last one. All cells of the comparative plot will contain the statistics from the last cell. Comparative plots are created by the HISTOGRAM, PROBPLOT and QQPLOT statements in PROC UNIVARIATE when a CLASS statement is also used. The Shapiro-Wilk test is only computed when there are less than or equal to 2000 observations in the analysis variable, and the W statistics and p-values are correct in both the printed output and output data sets.

To circumvent the problem, generate separate plots with a BY statement instead of CLASS statement.