'Life is after all a recursive summation, indeed     Let's do some Statistics!

Department of Civil and Environmental Engineering
Frank Batten College of Engineering and Technology
Old Dominion University
Norfolk, Virginia 23529-0241, USA
Tel) (757) 683-3753
Fax) (757) 683-5354


	
Return to CEE 700/800 Homepage
CEE 700/800 Access Counter
 
Go back to
SAS Source Page
MEANS Procedure - another Univariate Statistics
SAS Source: MEANS.SAS

Description

Performs a simple univariate descriptive statistics for numeric variables. Similar to UNIVARIATE procedure excluding Median, Quartiles, Mode estimates. Ideal for calculating separate descriptive statistics for groups of observations all at once in a single run. Input data set does not even have to be sorted by groups.

However, for testing a normality of a data set, you should use UNIVARIATE procedure instead.

SAS Listing


OPTIONS LINESIZE=70;
TITLE1 'MEANS - another Univariate Statistics';
DATA VIRUS; 
/* @@ means a loop in reading input variable sequence */
INPUT DILUTION $ COMPOUND $ TIME @@;
   IF DILUTION='A' THEN DL=1;
   ELSE IF DILUTION='B' THEN DL=2;
   ELSE IF DILUTION='C' THEN DL=4;
CARDS;
A PA 87  A PA 90
A PM 82  A PM 71
A UN 72  A UN 77
B PA 79  B PA 80
B PM 73  B PM 72
B UN 70  B UN 66
C PA 77  C PA 81
C PM 72  C PM 68
C UN 62  C UN 61
;
RUN;

PROC SORT; 
   BY COMPOUND;
RUN;

PROC MEANS N MEAN STD STDERR SUM VAR MIN MAX CV CSS USS
	    RANGE NMISS;
    BY COMPOUND;

/* N           = No. of nonmissing obs.                 */
/* STD         = Std. Dev.                              */
/* STDERR      = Std. error of mean, s/sq(n)            */
/* SUM         = Weighted sum                           */
/* VAR         = variance, s^2                          */
/* MIN & MAX   = minimum and Maximum                    */
/* CV          = % coeff. of variation, 100x(s/xbar)    */
/* SCC         = sum of sqares corrected for the mean   */
/* USS         = uncorrected sum of sqares              */
/* RANGE       = MAX-MIN                                */
/* NMISS       = no. of missing obs.                    */
RUN;

PROC MEANS NOPRINT;
   VAR TIME;
   BY COMPOUND;
   OUTPUT OUT=OUTA MEAN=M STD=S N=COUNT;
RUN;
   
PROC PRINT;
RUN;

SAS Listing

SAS User Guide (SUG) for Procedures (PROC) used in the Source

SUG MEANS procedure
SUG PRINT procedure
SUG SORT procedure
Go back to
SAS Source Page

Return to CEE 700/800 Homepage Return to CEE 700/800 Homepage Move to the Top of this page