Skip to main content

Statistical Analysis Software

This guides serves as an introduction to some Statistical Analysis Software. It aims to help patrons familiarize with five of the most popular statistical software.

SAS Tabs

We will reference these tabs throughout the manual

File; Edit; View; Tools; Run; Solution; Window; Help


Useful Symbols & Commands

  • Four types of commands: DATA step (read & edit data); PROC step (run built-in functions); macros (create and run own functions); ODS statements (set output settings, styles, etc.)
  • ; symbol: All statement lines end will semi-colons
  • /* */ symbol: this symbol introduces comments with the purpose of explaining the following code. Good programs require good commenting, in order to facilitate other people reading your code!  
  • RUN; Every program ends with RUN; To run a program, you click on the running man button (shown in the next picture)

How to Import Files

Steps for Importing a File:

  1. Open SAS: you will see an empty screen with three windows.
  • Results/Explorer: these windows are for browsing outputs and SAS libraries
  • Editor: used for writing and save your programs
  • Log: reads commands and displays any notes, errors, and warnings
  1. DATA step: DATA dataframe_name; INPUT variable, variable; DATALINES; In our example, the dataframe is called HTWT, then using the INPUT statement, we named the two numerical variables Height and Weight, and inputted the data using DATALINES statement (by listing all the observations containing height and weight values).
  2. PROC PRINT step (optional): PROC PRING DATA = dataframe_name; TITLE ‘dataframe_title’; RUN; This step allows you to visualize the dataframe you have stored.
  3. Run: Now you can visualize your dataframe in the Output window

How to Graph

Steps for Creating a Scatterplot: 

  1. Scatterplot title (optional): TITLE: scatterplot_title
  2. GPLOT procedure: PROC GPLOT DATA = dataframe_name; PLOT y_variable = x_variable; RUN;

In our example,

dataframe_name = HTWT;

     y_variable = weight;

x_variable = height .

  1. Output: in the Results Viewer, you can see the scatterplot.

How to Conduct Basic Statistical Analysis

Steps for Computing Summary Statistics

  1. UNIVARIATE procedure: PROC UNIVARIATE DATA = dataframe_name; VAR variable_of_interest; RUN;
  2. Output: in the Results Viewer, you can see all the previous outputs and also your summary statistics


Steps for Fitting a Regression Model:  

  1. REG procedure: PROC REG; model y_variable = x_variable; RUN;
  2. Output: in the Results Viewer, you can see your regression model.

Understanding the Log

In the log, you will see lots of notes, warnings or even errors. Understanding them is crucial when programming in SAS, as you may need to resolve them in order to run the program successfully.

Notes: these inform you about the status of your program. They usually do not interfere with running the program; however, sometimes it is a helpful resource in verifying certain information regarding the dataset or the efficiency of your program.

Warning: these are problems that SAS has found which, in most cases, you need to resolve even if the program runs.

Errors: these are issues that will most often stop the program from running. In our example, there is a misspelling of the dataframe HTWT.

For further details regarding these messages printed in the Log, you can reference:

Additional Resources

For additional help, you can refer to the following:

  • Help Tab: SAS Help and Documentation has resources, manuals and references you can consult​