Incorrect results when a stratum contains all missing values in PROC SURVEYMEANS


When the MISSING option is omitted from the PROC SURVEYMEANS statement and a STRATA statement is specified, if a categorical analysis variable contains all missing values in one or more strata then the MIN, MAX, RANGE, DF, PR|T|, CLM and CLSUM will be incorrect.

These same results will be incorrect when a continuous analysis variable contains all missing values in one or more strata, even when the MISSING option is specified.

Note that all other results are correct for either type of analysis variable and with or without the MISSING option.

To circumvent this problem, run the variable by itself omitting any strata with all missing values or merge these observations into any non-empty stratum. Note that if the all-missing strata are deleted then those observations will not be included in NMISS. If the all-missing strata are merged into another strata then those observations will be included in NMISS. In either case, the all-missing strata will not be included in the total number of strata.