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
Sentry Page Protection
Please Wait...
Proc Means [2-3]
SAS Base Exam


Specifying Statistics
By default, the MEANS procedure computes the n, mean, standard deviation, minimum and maximum.
Picture

What if you need other statistics such as median, mode or quantiles?

Simply add the statistics options to the MEANS procedure to request the statistics you need.

Example

​Copy and run the INTERNET data set from the yellow box below.
Picture

Let's supposed we need the mean, standard deviation, Q1 (lower quantile) and Q3 (upper quantile) only.

Example

Proc Means Data=Internet Mean Std Q1 Q3;
Var Chrome;
Run;

The mean, standard deviation, Q1 and Q3 statistics are specified in the MEANS procedure:
Picture

This will generate a table with only the statistics being requested:
Picture


Specifying Decimal Places

By default, the MEANS procedure displays 7 decimal places:
Picture

Sometimes, you might want to display the values at different decimal places.

Simply add the MAXDEC= option to the MEANS procedure to control the decimal places to display.

Example

Proc means Data=Internet Maxdec=2;
Var Chrome;
Run;
Picture

The Maxdec=2 displays the statistics in 2 decimal places:
Picture

Exercise
Write a SAS program and compute the Q1, Median and Q3 of the FIREFOX variable from the INTERNET data set.

Display the statistics in 3 decimal places.
Next

Need some help? 
​
Get Hint
Get Solution
Fill out my online form.
Already a member? Go to member's area.