The mean() function in SAS already ignores missing values by default, so it should only consider non-missing values. If you're still encountering issues, double-check if your missing values are properly represented as . (for numeric data). You don’t need to modify the mean() function; it automatically excludes missing values. Here’s the correct usage: mean(of var1 var2 ...); To check for missing values, use: proc means data=yourdata nmiss; var var1 var2 ...; run;
... View more