In the SURVEYMEANS procedure, when a STRATA statement is specified and a categorical (CLASS or character) variable is analyzed, if a level of the categorical variable does not appear in one or more strata, then the variance estimation and related statistics for the strata with the missing level will be incorrect. The incorrect results for this level include the standard error and variance of the mean, the standard deviation and variance of the sum, the confidence limits for the mean and sum, the t statistic and its p-value, and the coefficient of variation.
To identify categorical variable levels that do not appear in all strata, specify the LIST option on the STRATA statement and observe the occurrences of N=0 in the Stratum Information table.
To circumvent this problem, for each instance of N=0 for a categorical level of interest, issue a separate run of PROC SURVEYMEANS omitting the empty strata with a WHERE clause.
We also have a fix available that can be applied to PROC SURVEYMEANS in Release 8.1 running on a Windows operating system. To obtain the fix, contact SAS Technical Support.