The default statistics that the MEANS procedure produces (n-count, mean, standard deviation, minimum, and maximum) are not always the ones that you need. You might prefer to limit output to the mean of the values. Or you might need to compute a different statistic, such as the median or range of the values. To specify statistics, include statistic keywords as options in the PROC MEANS statement. When you specify a statistic in the PROC MEANS statement, default statistics are not produced. For example, to see the median and range of Perm.Survey numeric values, add the MEDIAN and RANGE keywords as options. proc means data=perm.survey median range; run; |
Variable | Median | Range |
Item1 Item2 Item3 Item4 Item5 Item6 Item7 Item8 Item9 Item10 Item11 Item12 Item13 Item14 Item15 Item16 Item17 Item18 |
4.0000000 3.0000000 4.0000000 3.5000000 3.0000000 4.0000000 3.0000000 3.0000000 2.5000000 3.0000000 3.0000000 3.0000000 3.0000000 2.5000000 3.0000000 2.0000000 3.0000000 3.0000000 |
3.0000000 4.0000000 1.0000000 3.0000000 4.0000000 3.0000000 4.0000000 3.0000000 3.0000000 3.0000000 4.0000000 1.0000000 3.0000000 3.0000000 4.0000000 4.0000000 2.0000000 3.0000000 |
The following keywords can be used with PROC MEANS to compute statistics: |
Keyword | Description |
CLM | Two-sided confidence limit for the mean |
CSS | Corrected sum of squares |
CV | Coefficient of variation |
KURTOSIS | Kurtosis |
LCLM | One-sided confidence limit below the mean |
MAX | Maximum value |
MEAN | Average |
MIN | Minimum value |
N | Number of observations with nonmissing values |
NMISS | Number of observations with missing values |
RANGE | Range |
SKEWNESS | Skewness |
STDDEV / STD | Standard deviation |
STDERR | Standard error of the mean |
SUM | Sum |
SUMWGT | Sum of the Weight variable values. |
UCLM | One-sided confidence limit above the mean |
USS | Uncorrected sum of squares |
VAR | Variance |
Quantile Statistics
Keyword | Description |
MEDIAN / P50 | Median or 50th percentile |
P1 | 1st percentile |
P5 | 5th percentile |
P10 | 10th percentile |
Q1 / P25 | Lower quartile or 25th percentile |
Q3 / P75 | Upper quartile or 75th percentile |
P90 | 90th percentile |
P95 | 95th percentile |
P99 | 99th percentile |
QRANGE | Difference between upper and lower quartiles: Q3-Q1 |
Hypothesis Testing
Keyword | Description |
PROBT | Probability of a greater absolute value for the t value |
T | Student's t for testing the hypothesis that the population mean is 0 |