Descriptive statistics

In this tutorial, you will learn to perform basic tests to obtain descriptive statistics of the sample using the MEANS procedure and the UNIVARIATE procedure.

MEANS Procedure

This procedure is widely used in “data cleansing” or “exploratory data analysis” tasks to determine if incorrect or “bad” values of analysis variables are contained in the data set that must be transformed or removed prior to further analysis (Ref -

used to find the contents (variable names, label, and description) of a SAS data-set.

Click here to download the data. Always place files in the C:\data folder. Also, set C:\data directory as the WORK directory.

To find its contents, run the code below.

SAS code:

proc contents data=work.gdata ;
run ;

Click here to view the html output of the contents. Set C:\data directory as the WORK directory.

To output the contents to a pdf, run the code below.

SAS code:

ods pdf file="C:\data\contents.pdf" ;
 proc contents data=work.gdata ;
ods pdf close;

Click here to view the pdf output of the contents.

Practice Exercises

Find the contents of the following data-sets

Road map

  • Data Input
  • Data Manipulation
  • Some useful PROC steps
  • Merging and subsetting a dataset
  • Compute descriptive statistics
  • Compute test of differences
  • Ordinary Least Squares
  • Probit/Logit Regression
  • DO loops
  • WHILE loops
  • NESTED loops