Sentry Page Protection
Data Analysis [5-15]
Proc Means
Proc Means is one of the most frequently used procedures in SAS.
Similar to Proc Univariate, it computes summary statistics on numeric variable(s).
Example
The PHARMA data set above contains a list of top 10 pharmaceutical companies in the world.
It contains the following variables:
- Rank
- Company
- Rev2014: Revenue in 2014 (million)
- Rev2013: Revenue in 2013 (million)
- GrowthR: Growth in Revenue (million)
- GrowthP: Growth in Revenue (percentage)
The companies are ranked by revenue in 2014.
Default Statistics
By default, Proc Means computes the 5 statistics below:
Example
Proc Means Data=Pharma;
Var Rev2014;
Run;
By default, Proc Means computes the 5 statistics below:
- N
- Mean
- Standard Deviation
- Minimum
- Maximum
Example
Proc Means Data=Pharma;
Var Rev2014;
Run;
Proc Means computed the N, Mean, Standard Deviation, Minimum and Maximum values from the Rev2014 variable.
The top 10 pharmaceutical companies generated, on average, 33731.6 million in the year of 2014.
The company with the highest revenue generated 47101 million, while the one at the bottom of the list generated 20446 millions.
Exercise
Compute the 5 statistics on the revenue in 2013.
Did the average revenue from the top 10 pharmaceuticals go up from 2013 to 2014?
Compute the 5 statistics on the revenue in 2013.
Did the average revenue from the top 10 pharmaceuticals go up from 2013 to 2014?
Need some help?
HINT:
Simply use Proc Means on the variable Rev2013.
SOLUTION:
Proc Means Data=Pharma;
Var Rev2013;
Run;
The average revenue in 2013 is 32619 million. It went up slightly from 2013 to 2014.
Fill out my online form.