Descriptive Statistics are: N Frequency Count MEAN - Average STD Standard Deviation MIN - Minimum MAX - Maximum Generate Statistics Using PROC MEANS
Syntax Proc Means Data = XXXX <options>; var XXXX; classXXX; (by XXXX); output out=XXX; Run; Generate Statistics Using PROC MEANS
By default, 5 statistics are generated. Additional statistics can be generated. Use option MAXDEC= to specify how many decimal point needed for the statistics Use VAR statement to choose a list of variables for statistics Use CLASS statement to calculate statistics for groups Use OUT= option to create a SAS data containing the descriptive statistics -Many procedures allow you to create SAS datasets -You can create a report in a dataset You can also use BY statement to calculate statistics for groups Using PROC SORT Whenever there is BY statement in Proc Step or Data Step, your data needs to be sorted or Indexed Use PROC SORT to sort data Proc Sort Data=XXXX <options>; By xxxx; Run; Noduplicate option eliminated duplicate records Nodupkey options only keep records with unique value for by variables Generate Statistics Using PROC SUMMARY Syntax is the same as PROC MEANS Syntax Proc Means Data = XXXX <options>; var XXXX; classXXX; (by XXXX); output out=XXX; Run;
The difference is -By default, PROC MEANS generate output -By default, PROC SUMMARY does not generate output -To force PROC SUMMARY to generate output, use PRINT option Difference Of PROC UNIVARIATE and PROC MEANS, PROC SUMMARY Syntax for PROC UNIVARIATE Proc Univariate Data = xxx <options>; Var xxxx; Class xxxx; Output out=xxxx; Run;
PROC UNIVARIATE Provides descriptive statistics, similar to PROC MEANS or PROC SUMMARY Provide additional information such as extreme values, quantiles and frequency tables