Search the site...

SASCRUNCH TRAINING
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
Data Analysis [8-15]


Working with Multiple Analysis Variables
​(Proc Means)
You can analyze multiple variable(s) simultaneously using Proc Means.

Example
Picture

The SALES data set contains the first 10 sales made by two salespersons. 

Let's compare the sales performance between the two.

Example

Proc Means Data=Sales;
Var Sales1 Sales2;
Run;
Picture

The VAR statement has two variables: Sales1 and Sales2.

The statistics are computed for both variables:
Picture

Additional Statistics

You can also request other statistics to be computed, just like when you have only 1 variable:

Example

​Proc Means Data=Sales Mean CLM;
Var Sales1 Sales2;
Run;
Picture

The Mean and the 95% Confidence Limits will be computed instead:
Picture

Exercise

Copy and run the STOCKS data set below:

The STOCKS data set contains the stock prices for Microsoft Corporation (MSFT) from October 12, 2015 to October 23, 2015.

Below are the list of variables from the STOCKS data set:
  • Date
  • Open: Opening Price
  • High: Highest Price
  • Low: Lowest Price
  • Close: Closing Price

Compute the 5 default statistics (N, Mean, STD, Min and Max) on the 4 prices.
Next

Need some help? 


HINT:
List all of the variables to be analyzed in the VAR statement.


SOLUTION:
Proc Means Data=Stocks;
Var Open High Low Close;
Run;


Fill out my online form.
Already a member? Go to member's area.