Observations with missing values incorrectly excluded from analysis in PROC SURVEYMEANS


When the MISSING option is not specified on the PROC SURVEYMEANS statement and more than one class or categorical variable is listed on the VAR statement, observations with a missing value for any class variable will be incorrectly excluded from estimates for all of the class variables. As a result, if the pattern of missing values is different across the class variables then all of their output statistics will be incorrect. In addition, if one or more continuous variables are also specified on the VAR statement, then the degrees of freedom, p-values and confidence intervals will be incorrect for all of the class variables even if there is a consistent pattern of missing values in the class variables.

In all of these situations, corresponding observations are not excluded from continuous variables on the VAR statement, so the results for these variables are correct.

To circumvent this problem, run any categorical variables with missing values by themselves in separate executions of the procedure.