HOME Module List Site Index About This Site glossary" Resources Innovative Technology Center UT Statistics Courses
Using SAS Choose Design ANOVA Compare Means Regression Examples
Using SAS Using SAS: Table of Contents

Basic procedures
PROC Means

The Means procedure calculates summary statistics, such as means and std. deviations. For example,
PROC MEANS DATA=one N MEAN STD CV MIN MAX STDERR; BY treatment;
VAR weight;
RUN;
will calculate numbers of observations (N), means (MEAN), std. deviations (STD), coefficients of variation (CV), and minimum and maximum values (MIN MAX) for each treatment group, for the variable weight.
    example

By default, results are printed to the Results Viewer Window. If you need to store the values, possibly for later processing, use the OUPUT statement. You can turn off printing to the Results Viewer Window if desired with the NOPRINT option.
PROC MEANS DATA=one NOPRINT; BY treatment;
VAR weight;
OUTPUT OUT=mmm MEAN=mweight;
RUN;
This creates a new dataset called MMM which will contain the mean weight for each treatment in a variable called mweight. No visible output will be produced, just a new dataset. To see the contents of this new dataset, run
PROC PRINT DATA=mmm;
RUN;

    example

 

Related Topics:                                                                                                     Using SAS: Table of Contents
PROC Print
PROC Sort
PROC Means
PROC Univariate

Home | Contact us | Module list & summary | Glossary/Terms | About this site | Stats courses | Links | Index