Producing Summary Reports - PowerPoint PPT Presentation

1 / 158
About This Presentation
Title:

Producing Summary Reports

Description:

Chapter 8 Producing Summary Reports Section 8.1 Introduction to Summary Reports Objectives Identify the different report writing procedures. Create one-way and two ... – PowerPoint PPT presentation

Number of Views:269
Avg rating:3.0/5.0
Slides: 159
Provided by: KathyK91
Category:

less

Transcript and Presenter's Notes

Title: Producing Summary Reports


1
Chapter 8
  • Producing Summary Reports

2
Section 8.1
  • Introduction toSummary Reports

3
Objectives
  • Identify the different report writing procedures.
  • Create one-way and two-way frequency tables using
    the FREQ procedure.
  • Restrict the variables processed by the FREQ
    procedure.
  • Generate simple descriptive statistics using the
    MEANS procedure.
  • Group observations of a SAS data set for analysis
    using the CLASS statement in the MEANS procedure.

4
Summary Reports
Small Data Set
LastName FirstName Age TORRES
JAN 23LANGKAMM SARAH 46SMITH
MICHAEL 71WAGSCHAL NADJA 37TOERMOEN
JOCHEN 16
Report Writing Step
Report
Large Data Set
Summarize Data and Report Writing Step
LastName FirstName Age TORRES
JAN 23LANGKAMM SARAH 46SMITH
MICHAEL 71WAGSCHAL NADJA 37TOERMOEN
JOCHEN 16 . . . . .
. Ingersol Hans 32 Himelewski Janice 87
...
5
Summary Report Procedures
PROC MEANSproducessimple statistics.
PROC FREQproduces frequency counts.
Toolbox
PROC REPORTproduces flexibledetail and summary
reports.
6
PROC FREQ Output
Distribution of Job Code Values
The FREQ Procedure Job
Cumulative
Cumulative Code Frequency Percent
Frequency Percent ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ FLTAT1
14 20.29 14 20.29
FLTAT2 18 26.09 32
46.38 FLTAT3 12 17.39
44 63.77 PILOT1 8
11.59 52 75.36 PILOT2
9 13.04 61 88.41
PILOT3 8 11.59 69
100.00
7
PROC MEANS Output
Salary by Job Code
The MEANS Procedure
Analysis Variable Salary Job N Code
Obs N Mean Std Dev Minimum
Maximum ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ FLTAT1 14
14 25642.86 2951.07 21000.00
30000.00 FLTAT2 18 18 35111.11
1906.30 32000.00 38000.00 FLTAT3 12
12 44250.00 2301.19 41000.00
48000.00 PILOT1 8 8 69500.00
2976.10 65000.00 73000.00 PILOT2 9
9 80111.11 3756.48 75000.00
86000.00 PILOT3 8 8 99875.00
7623.98 92000.00 112000.00 ƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒ
8
PROC REPORT Output
Salary Analysis Job Code Home Base
Salary ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
FLTAT1 CARY 131,000
FRANKFURT 100,000
LONDON 128,000 FLTAT2 CARY
245,000 FRANKFURT
181,000 LONDON
206,000 FLTAT3 CARY
217,000 FRANKFURT
134,000 LONDON
180,000 PILOT1 CARY
211,000 FRANKFURT
135,000 LONDON
210,000 PILOT2 CARY
323,000 FRANKFURT
240,000 LONDON
158,000 PILOT3 CARY
300,000 FRANKFURT
205,000 LONDON
294,000

3,598,000
9
Section 8.2
  • Basic Summary Reports

10
SAS Vocabulary
  • PROC FREQ
  • TABLES
  • NLEVELS
  • Crosstabular
  • PROC MEANS
  • VAR
  • CLASS
  • MAXDEC

11
Goal Report 1
  • International Airlines wants to know how many
    employees are in each job code.

Distribution of Job Code Values
The FREQ Procedure Job
Cumulative
Cumulative Code Frequency Percent
Frequency Percent ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ FLTAT1
14 20.29 14 20.29
FLTAT2 18 26.09 32
46.38 FLTAT3 12 17.39
44 63.77 PILOT1 8
11.59 52 75.36 PILOT2
9 13.04 61 88.41
PILOT3 8 11.59 69
100.00
12
Goal Report 2
  • Categorize job code and salary values to
    determine how many employees fall into each group.

Salary Distribution by Job Codes
The FREQ Procedure
Table of JobCode by Salary JobCode
Salary Frequency
Percent Row Pct
Col Pct Less tha25,000 tMore tha
Total n 25,000o
50,000n 50,000 ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒ
ƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ Flight Attendant
5 39 0 44
7.25 56.52 0.00 63.77
11.36 88.64 0.00
100.00 100.00 0.00
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒ
ƒƒƒƒˆ Pilot 0 0
25 25
0.00 0.00 36.23 36.23
0.00 0.00 100.00
0.00 0.00 100.00
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ
Total 5 39 25
69 7.25 56.52
36.23 100.00
13
Creating a Frequency Report
  • PROC FREQ displays frequency counts of the data
    values in a SAS data set.
  • General form of a simple PROC FREQ step

PROC FREQ DATASAS-data-set RUN
Example
proc freq dataia.crew run
14
Creating a Frequency Report
  • By default, PROC FREQ
  • analyzes every variable in the SAS data set
  • displays each distinct data value
  • calculates the number of observations in which
    each data value appears (and the corresponding
    percentage)
  • Indicates, for each variable, how many
    observations have missing values.

15
Default Frequency Reports
ia.crew

proc freq dataia.crew run
...
16
Variables to Analyze
  • PROC FREQ is appropriate for variables with only
    a few values.
  • For example, if you have a class list with one
    row for each student, it would not be very
    meaningful to analyze the student ID if there is
    one row per person in the table.
  • PROC FREQ enables you to choose the variables to
    analyze.

17
Printing Selected Variables
  • SAS enables you to select the variables to
    display or analyze.
  • In PROC PRINT, what statement selected
    the variables for the output?

...
18
Printing Selected Variables
  • SAS enables you to select the variables to
    display or analyze.
  • In PROC PRINT, what statement selected
    the variables for the output?
  • The VAR statement

19
Printing Selected Variables
  • SAS enables you to select the variables to
    display or analyze.
  • In PROC FREQ, what statement selects the
    variables?

PROC Statement to select variables
PRINT VAR
...
20
Printing Selected Variables
  • SAS enables you to select the variables to
    display or analyze.
  • In PROC FREQ, what statement selects the
    variables?
  • The TABLES statement

PROC Statement to select variables
PRINT VAR
21
Printing Selected Variables
  • SAS enables you to select the variables to
    display or analyze.

PROC Statement to select variables
PRINT VAR
FREQ TABLES
22
One-Way Frequency Report
  • Use the TABLES statement to limit the variables
    included in the frequency counts.
  • These are typically variables that have a limited
    number of distinct values.
  • General form of a PROC FREQ step with a TABLES
    statement

PROC FREQ DATASAS-data-set TABLES
SAS-variables lt / options gt RUN
Ignore the option for now.
23
One-Way Frequency Report
  • Use the TABLE statement to analyze JobCode.
  • For example

proc freq dataia.crew tables JobCode run
24
Creating a Frequency Report Example
title 'Distribution of Job Code Values' proc
freq dataia.crew tables JobCode run
Distribution of Job Code
Values The FREQ
Procedure Job
Cumulative Cumulative Code Frequency
Percent Frequency Percent
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒ FLTAT1 14 20.29
14 20.29 FLTAT2 18
26.09 32 46.38 FLTAT3
12 17.39 44 63.77
PILOT1 8 11.59 52
75.36 PILOT2 9 13.04
61 88.41 PILOT3 8
11.59 69 100.00
25
One-Way Frequency Report
  • You can select more than one variable to analyze
    by listing them all in the TABLES statement.
    Separate them with a space.
  • This creates one report for each variable.
  • For example

proc freq dataia.crew tables JobCode
Location RUN
26
Creating a Frequency Report Example
title proc freq dataia.crew tables JobCode
Location run
The
FREQ Procedure Job
Cumulative Cumulative Code Frequency
Percent Frequency Percent
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒ FLTAT1 14 20.29
14 20.29 FLTAT2 18
26.09 32 46.38 FLTAT3
12 17.39 44 63.77
PILOT1 8 11.59 52
75.36 PILOT2 9 13.04
61 88.41 PILOT3 8
11.59 69 100.00
Cumulative Cumulative
Location Frequency Percent Frequency
Percent ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ CARY 27
39.13 27 39.13 FRANKFURT
19 27.54 46
66.67 LONDON 23 33.33
69 100.00
JobCode Report
Location Report
27
Displaying the Number of Levels Example
  • Use the NLEVELS option in the PROC FREQ statement
    to display the number of levels for the variables
    included in the frequency counts.

title 'Distribution of Location Values' proc
freq dataia.crew nlevels tables
Location run
28
Creating a Frequency Report Example
Distribution of Location Values
The FREQ Procedure
Number of Variable Levels
Variable Levels
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
Location 3
Cumulative Cumulative Location
Frequency Percent Frequency
Percent ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ CARY 27
39.13 27 39.13 FRANKFURT
19 27.54 46
66.67 LONDON 23 33.33
69 100.00
29
Creating a Frequency Report
  • To display the number of levels without
    displaying the frequency counts, add the NOPRINT
    option to the TABLES statement.

proc freq dataia.crew nlevels tables JobCode
Location / noprint title 'Number of Levels
for Job Code and Location' run
Number of Levels for Job Code and Location
The FREQ Procedure Number of
Variable Levels Variable
Levels ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
JobCode 6 Location
3
30
Creating a Frequency Report
  • To display the number of levels for all variables
    without displaying any frequency counts, use the
    _ALL_ keyword and the NOPRINT option in the
    TABLES statement.
  • (You must also use the NLEVELS option.)

title 'Number of Levels for All Variables' proc
freq dataia.crew nlevels tables _all_ /
noprint run
31
Analyzing Categories of Values
  • International Airlines wants to use formats to
    categorize the flight crew by job code.

32
Analyzing Categories of Values Example

proc format value codefmt
'FLTAT1'-'FLTAT3''Flight Attendant'
'PILOT1'-'PILOT3''Pilot' run proc freq data
ia.crew format JobCode codefmt. tables
JobCode run
33
Analyzing Categories of Values Example

Distribution of Job Code
Values The FREQ
Procedure
Cumulative Cumulative JobCode
Frequency Percent Frequency
Percent ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Flight Attendant
44 63.77 44 63.77 Pilot
25 36.23 69
100.00

PROC FREQ automatically groups the data by the
formatted value of a variable if a format is
associated with that variable.
34
Exercise
  • This exercise reinforces the concepts discussed
    previously.

35
Exercises
  • Use the StudyAbroad2 delimited data file to
    create a data set called StudyLocations. The
    variables in order are Country, Cost, Time, and
    BeginDate.
  • Format Cost to reflect currency values and
    BeginDate to a readable date value.
  • Change the column headings to Country, Trip Cost,
    Length of Program, and Trip Begin Date.
  • Create a listing report to verify all the work
    for 1 above.
  • Use PROC FREQ to determine the frequencies for
    Country and Time.

36
Exercises A Solution
data StudyLocations infile 'StudyAbroad2.csv'
dsd input Country 15. Cost Time 8.
BeginDate mmddyy10. format BeginDate
mmddyy10. Cost dollar8. label Cost'Trip
Cost' Time'Length of Program'
BeginDate 'Trip Begin Date' run proc print
data StudyLocations noobs label run proc freq
dataStudyLocations tables Country Time run
37
Exercises
Partial PROC PRINT Output
Length
Trip of Trip Begin Country
Cost Program Date Germany
4,200 Semester 09/01/2007 France
8,162 Year 10/01/2007 Great
Britain 8,225 Year
09/01/2007 Australia 7,500 Year
06/01/2007 Sweden 5,286
Semester 12/01/2007 Spain 3,500
Semester 09/01/2007 Mexico
2,300 Semester 09/01/2007 France
3,971 Semester 10/01/2007 Great Britain
8,225 Year 09/01/2007 Sweden
5,286 Semester 12/01/2007 Germany
4,200 Semester 09/01/2007 Great
Britain 4,700 Semester
09/01/2007 Germany 7,625 Year
09/01/2007
38
Exercises
Partial PROC FREQ Output
The FREQ Procedure
Cumulative Cumulative Country
Frequency Percent Frequency
Percent ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Australia
11 20.75 11 20.75 France
9 16.98 20
37.74 Germany 7 13.21
27 50.94 Great Britain 10
18.87 37 69.81 Mexico
4 7.55 41
77.36 Spain 5 9.43
46 86.79 Sweden 7
13.21 53 100.00
Length of Program
Cumulative Cumulative Time
Frequency Percent Frequency
Percent ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Semester 25
47.17 25 47.17 Year
28 52.83 53 100.00
39
Crosstabular Frequency Reports
  • A two-way, or crosstabular, frequency report
    analyzes all possible combinations of the
    distinct values of two variables.
  • The asterisk () operator in the TABLES statement
    is used to cross variables.
  • General form of the FREQ procedure to create a
    crosstabular report

PROC FREQ DATASAS-data-set TABLES
variable1variable2 RUN
40
Crosstabular Frequency Reports Example

proc format value codefmt
'FLTAT1'-'FLTAT3''Flight Attendant'
'PILOT1'-'PILOT3''Pilot' value money
low-lt25000 'Less than 25,000'
25000-50000'25,000 to 50,000'
50000lt-high'More than 50,000' run proc freq
dataia.crew tables JobCodeSalary format
JobCode codefmt. Salary money. title 'Salary
Distribution by Job Codes' run
41
Crosstabular Frequency Reports
Salary Distribution by Job Codes
The FREQ Procedure
Table of JobCode by Salary JobCode
Salary Frequency
Percent Row Pct
Col Pct Less tha25,000 tMore tha
Total n 25,000o
50,000n 50,000 ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒ
ƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ Flight Attendant
5 39 0 44
7.25 56.52 0.00 63.77
11.36 88.64 0.00
100.00 100.00 0.00
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒ
ƒƒƒƒˆ Pilot 0 0
25 25
0.00 0.00 36.23 36.23
0.00 0.00 100.00
0.00 0.00 100.00
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ
Total 5 39 25
69 7.25 56.52
36.23 100.00
Second Variable
First Variable
42
Crosstabular Frequency Reports Example

To display the crosstabulation results in a
listing form, add the CROSSLIST option to the
TABLES statement.
proc freq dataia.crew tables
JobCodeLocation / crosslist title 'Location
Distribution for Job Codes' run
43
Crosstabular Frequency Reports
Partial Output
Location Distribution for Job
Codes The FREQ
Procedure Table of JobCode by
Location Job
Row Column Code Location
Frequency Percent Percent Percent
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒƒƒ FLTAT1 CARY 5
7.25 35.71 18.52 FRANKFURT
4 5.80 28.57 21.05
LONDON 5 7.25 35.71
21.74 Total 14 20.29
100.00 ----------------------------------------
--------------------- FLTAT2 CARY
7 10.14 38.89 25.93
FRANKFURT 5 7.25 27.78
26.32 LONDON 6 8.70
33.33 26.09 Total 18
26.09 100.00 ----------------------------
---------------------------------
44
Exercise
  • This exercise reinforces the concepts discussed
    previously.

45
Exercises
Using the StudyLocations data set you created in
a previous exercise, create a crosstabular
frequency report using the CROSSLIST option.
Display the length of the program by country.
46
Exercises
proc freq dataStudyLocations tables
TimeCountry /crosslist run
47
Exercises
48
Business Task
  • International Airlines wants to determine the
    minimum, maximum, and average salary for each job
    code.

49
Calculating Summary Statistics Example
  • The MEANS procedure displays simple descriptive
    statistics for the numeric variables in a SAS
    data set.
  • General form of a simple PROC MEANS step

PROC MEANS DATASAS-data-set RUN
How many variables will be analyzed?
proc means dataia.crew title 'Salary
Analysis' run
50
Calculating Summary Statistics
Salary Analysis The
MEANS Procedure Variable N Mean
Std Dev Minimum Maximum ƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒ HireDate 69 9812.78 1615.44
7318.00 12690.00 Salary 69
52144.93 25521.78 21000.00
112000.00 ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ

In this example, PROC MEANS analyzed two
variables, HireDate and Salary.
51
Calculating Summary Statistics
  • By default, PROC MEANS
  • analyzes every numeric variable in the SAS data
    set
  • prints the following statistics
  • N
  • MEAN
  • ST
  • MIN
  • MAX
  • excludes missing values before calculating
    statistics.

52
Summary Statistics
Default Statistics
53
Choosing Summary Statistics
Other Statistics
For more information on other PROC MEANS options,
refer to the SAS OnlineDoc.
54
Choosing Summary Statistics
  • To see a different statistic or control the
    number of default statistics, list the statistics
    you want in the PROC MEANS statement as an option
    to the step.
  • You saw this in Chapter 2 when you worked on
    syntax errors.

55
Choosing Summary Statistics
title 'Salary Analysis' proc means dataia.crew
mean max min run
Salary Analysis
The MEANS Procedure Variable Mean
Maximum Minimum
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒ HireDate 9812.78
12690.00 7318.00 Salary
52144.93 112000.00 21000.00
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒ
? The order of the statistics changed from the
default order. Because min is listed in the
statement after max, that is the order that they
appear in the output.
56
Grouping Observations
PROC MEANS may not always print two digits to the
right of the decimal point. To control the
maximum number of decimal places for PROC MEANS
to use in printing results, use the MAXDEC
option in the PROC MEANS statement. General
form of the PROC MEANS statement with the MAXDEC
option
PROC MEANS DATASAS-data-set MAXDECnumber RUN
57
Choosing Summary Statistics
title 'Salary Analysis' proc means dataia.crew
mean max min maxdec1 run
Salary Analysis
The MEANS Procedure Variable Mean
Maximum Minimum
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒ HireDate 9812.8 12690.0
7318.0 Salary 52144.9
112000.0 21000.0 ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
Values are rounded to the specified number of
decimals. The range of values for the MAXDEC
option is 0-8. The MAXDEC option does not use
format names to format the values.
58
Printing Selected Variables
SAS enables you to select the variables to
display and analyze. In PROC MEANS,
what statement selects the variables?
PROC Statement to select variables
PRINT VAR
FREQ TABLES
...
59
Printing Selected Variables

SAS enables you to select the variables to
display and analyze. In PROC MEANS,
what statement selects the variables? The VAR
statement
PROC Statement to select variables
PRINT VAR
FREQ TABLES
60
Printing Selected Variables
  • SAS enables you to select the variables to
    display and analyze.

PROC Statement to select variables
PRINT VAR
FREQ TABLES
MEANS VAR
61
Selecting Variables
  • The VAR statement restricts the variables
    processed by PROC MEANS.
  • General form of the VAR statement

VAR SAS-variable(s)
62
Selecting Variables Example
ia.crew
proc means dataia.crew var Salary title
'Salary Analysis' run
Salary Analysis The
MEANS Procedure Analysis
Variable Salary N Mean
Std Dev Minimum Maximum
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ 69 52144.93
25521.78 21000.00 112000.00
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
...
63
Grouping Observations
  • The CLASS statement in the MEANS procedure
    groups the observations of the SAS data set for
    analysis.
  • General form of the CLASS statement

CLASS SAS-variable(s)
64
Grouping Observations Example
ia.crew
title 'Salary by Job Code' proc means
dataia.crew maxdec2 var Salary class
JobCode run
...
65
Grouping Observations
Salary by Job Code
The MEANS Procedure
Analysis Variable Salary Job N Code
Obs N Mean Std Dev Minimum
Maximum ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ FLTAT1 14
14 25642.86 2951.07 21000.00
30000.00 FLTAT2 18 18 35111.11
1906.30 32000.00 38000.00 FLTAT3 12
12 44250.00 2301.19 41000.00
48000.00 PILOT1 8 8 69500.00
2976.10 65000.00 73000.00 PILOT2 9
9 80111.11 3756.48 75000.00
86000.00 PILOT3 8 8 99875.00
7623.98 92000.00 112000.00 ƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒ
66
Using Formats with PROC MEANS
You cannot format the statistics, but you can
format the CLASS variables.
proc format value codefmt
'FLTAT1'-'FLTAT3''Flight Attendant'
'PILOT1'-'PILOT3''Pilot' run title 'Salary by
Job Code' proc means dataia.crew mean max min
maxdec2 var Salary class JobCode
format JobCode codefmt. run
67
Grouping Observations
Salary by Job Code
The MEANS Procedure
Analysis Variable Salary
N JobCode Obs Mean
Maximum Minimum ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Flight
Attendant 44 34590.91 48000.00
21000.00 Pilot 25 83040.00
112000.00 65000.00
68
Exercise
  • This exercise reinforces the concepts discussed
    previously.

69
Exercises
  • Using the StudyLocations data set that you
    created in the previous section and PROC MEANS,
    create a report that includes the following
  • with the minimum, maximum, and range of Cost
  • grouping the cost of the trip by Country
  • appropriately formatted values

70
Exercises
proc means data StudyLocations min max range
var cost class Country run
71
Exercises (Alternate Solution)
To remove the NOBS statistic, use the NONOBS
option in the PROC MEANS statement.
proc means data StudyLocations min max range
nonobs var cost class Country run
72
Exercise Section 8.2
  • This exercise reinforces the concepts discussed
    previously.

73
Section 8.3
  • The REPORT Procedure

74
Objectives
  • Use the REPORT procedure to create a listing
    report.
  • Apply the ORDER usage type to sort the data in a
    listing report.
  • Apply the SUM and GROUP usage types to create a
    summary report.
  • Use the RBREAK statement to produce a grand total.

75
SAS Vocabulary
  • PROC REPORT
  • WINDOWSWD
  • NOWINDOWSNOWD
  • PROC TABULATE
  • COLUMN
  • DEFINE
  • FORMAT
  • WIDTH
  • ORDER
  • GROUP
  • RBREAK
  • HEADLINE
  • HEADSKIP

76
REPORT Procedure Features
  • PROC REPORT enables you to
  • create listing reports
  • Rows are listed one line at a time (as in
    PROC PRINT output).
  • create summary reports
  • Data is grouped and many rows are combined in one
    line of output.

Data Set
Summarized Report
LastName FirstName Date Purchase TORRES
JAN 16409 120.80 TORRES JAN 16578
500.20 SMITH MICHAEL 16614 82.25 SMITH
MICHAEL 15999 16.48 SMITH MICHAEL 16080
25.45 YONKERS JESSIE 16783 832.98 ZIMMEL
JIMMY 16999 48.32
LastName FirstName Date Purchase TORRES
JAN 16409 621.00 SMITH MICHAEL 16614
124.18 YONKERS JESSIE 16783 832.98 ZIMMEL
JIMMY 16999 48.32
...
77
REPORT Procedure Features
  • PROC REPORT enables you to
  • create listing reports
  • Rows are listed one line at a time (as in
    PROC PRINT output).
  • create summary reports
  • Data is grouped and many rows are combined in one
    line of output.
  • enhance reports easily, for example, with
    formats, labels, and groups
  • request separate subtotals and grand totals
  • generate reports in an interactive
    point-and-click (default) or programming
    environment.

78
PROC REPORT versus PROC PRINT
79
Creating a List Report
  • General form of a simple PROC REPORT step
  • Selected options

PROC REPORT DATASAS-data-set ltoptionsgt RUN
WINDOWS WD invokes the procedure in an interactive REPORT window (default).
NOWINDOWS NOWD displays the report in the OUTPUT window.
proc report dataia.crew nowd run
80
Creating a List Report
proc report dataia.crew nowd run
  • Output


JobCod Location Phone
EmpID e Salary LONDON
2388 E01163 FLTAT2 34000
CARY 1381 E02102 FLTAT3
42000 LONDON
2553 E00710 FLTAT2 33000 CARY
2554 E01818 PILOT2 82000
CARY 2569 E03921
FLTAT3 47000 LONDON
2577 E03339 FLTAT2 35000
LONDON 2582 E03555 PILOT2
83000 CARY 2599
E02766 FLTAT2 32000 LONDON
2745 E03740 PILOT1 73000
FRANKFURT 1160 E01483 FLTAT2
33000 CARY 2779
E01384 FLTAT2 38000 FRANKFURT
2797 E00223 PILOT3 105000
FRANKFURT 1136 E04581 PILOT1
69000 FRANKFURT
1183 E00632 PILOT3 100000
FRANKFURT 2960 E03884 FLTAT2
38000 LONDON 2997
E00034 FLTAT3 44000 LONDON
1156 E03591 FLTAT3 47000
FRANKFURT 1194 E04064 FLTAT2
37000 FRANKFURT 1197
E01996 FLTAT1 26000 LONDON
1160 E04356 FLTAT2 34000
LONDON 1552 E01447 FLTAT3
45000 FRANKFURT
1553 E02679 FLTAT1 27000 CARY
1555 E02606 FLTAT2 36000
LONDON 1565 E03323
FLTAT1 22000
81
Creating a List Report
  • What do you notice about JobCode?

Output

JobCod Location Phone
EmpID e Salary LONDON
2388 E01163 FLTAT2 34000
CARY 1381 E02102 FLTAT3
42000 LONDON
2553 E00710 FLTAT2 33000 CARY
2554 E01818 PILOT2 82000
CARY 2569 E03921
FLTAT3 47000 LONDON
2577 E03339 FLTAT2 35000
LONDON 2582 E03555 PILOT2
83000 CARY 2599
E02766 FLTAT2 32000 LONDON
2745 E03740 PILOT1 73000
FRANKFURT 1160 E01483 FLTAT2
33000 CARY 2779
E01384 FLTAT2 38000 FRANKFURT
2797 E00223 PILOT3 105000
FRANKFURT 1136 E04581 PILOT1
69000 FRANKFURT
1183 E00632 PILOT3 100000
FRANKFURT 2960 E03884 FLTAT2
38000 LONDON 2997
E00034 FLTAT3 44000 LONDON
1156 E03591 FLTAT3 47000
FRANKFURT 1194 E04064 FLTAT2
37000 FRANKFURT 1197
E01996 FLTAT1 26000 LONDON
1160 E04356 FLTAT2 34000
LONDON 1552 E01447 FLTAT3
45000 FRANKFURT
1553 E02679 FLTAT1 27000 CARY
1555 E02606 FLTAT2 36000
LONDON 1565 E03323
FLTAT1 22000
82
Creating a List Report
  • What happens if you forget the NOWD option?
  • Try it.
  • Your instructor can show you how to easily change
    the width of JobCode, the format of Salary, and
    change the color of Salary to green.

proc report dataia.crew run
83
Creating a List Report
  • What happens if you forget the NOWD option?

proc report dataia.crew run
An interactive window opens and you can make
changes to the report interactively, rather than
modifying the code. You must close this window
before any other code is submitted, otherwise,
the code will wait in the buffer for you to close
the window. After the window is closed, any code
submitted will be executed.
84
The REPORT Procedure
  • The default listing displays
  • each data value as it is stored in the data set,
    or formatted value if a format is stored with the
    data
  • variable names or labels as report column
    headings
  • a default width for the report columns (The width
    that is used is discussed later.)
  • character values left-justified
  • numeric values right-justified
  • observations in the order in which they are
    stored in the data set.

85
Printing Selected Variables
SAS enables you to select the variables to
display and analyze. In PROC REPORT,
what statement selects the variables?

PROC Statement to select variables
PRINT VAR
FREQ TABLES
MEANS VAR
...
86
Printing Selected Variables
SAS enables you to select the variables to
display and analyze. In PROC REPORT,
what statement selects the variables? The
COLUMN statement
PROC Statement to select variables
PRINT VAR
FREQ TABLES
MEANS VAR
87
Reference Printing Selected Variables
  • SAS enables you to select the variables to
    display and analyze.

PROC Statement to select variables
PRINT VAR
FREQ TABLES
MEANS VAR
REPORT COLUMN
88
Printing Selected Variables
  • You can use a COLUMN statement in PROC REPORT to
    do the following
  • select the variables to appear in the report
  • order the variables in the report
  • General form of the COLUMN statement

COLUMN SAS-variables
89
Sample Listing Report Example
title 'Salary Analysis' proc report dataia.crew
nowd column JobCode Location Salary run
Partial SAS Output
Salary Analysis JobCod Location
Salary e PILOT1 LONDON
72000 FLTAT3 CARY
41000 PILOT2 FRANKFURT 81000
PILOT2 FRANKFURT 83000 FLTAT2
LONDON 36000 PILOT1 LONDON
65000 FLTAT2 FRANKFURT
35000 FLTAT2 FRANKFURT 38000
FLTAT1 LONDON 28000 FLTAT3
LONDON 44000 FLTAT2 CARY
37000 . . .
90
The DEFINE Statement
  • You can enhance the report by using DEFINE
    statements to perform the following tasks
  • define how each variable is used in the report
  • assign formats to variables
  • specify report column headers and column widths
  • change the order of the rows in the report

91
The DEFINE Statement
You should add a DEFINE statement to the PROC
REPORT step for every variable that you want to
look differently from the default appearance.
You do not have to add a DEFINE statement for
every variable only for the ones whose
appearance you want to change.
  • General form of the DEFINE statement

DEFINE variable / ltusagegt ltattribute-listgt
required
92
The DEFINE Statement
Selected attributes If there is a label
stored in the descriptor portion of the data set,
it is the default header. If one is not stored,
SAS uses the variable name.
' report-column-header ' defines the report
column header.
Example
title 'Salary Analysis' proc report dataia.crew
nowd column JobCode Location Salary
define Salary / 'Annual Salary' run
93
Sample Listing Report Example

The / is required.
94
The DEFINE Statement
  • Selected attributes
  • If there is a format stored in the descriptor
    portion of the data set, it is the default format.

FORMAT assigns a format to a variable.
Example
title 'Salary Analysis' proc report dataia.crew
nowd column JobCode Location Salary
define Salary / 'Annual Salary' format
dollar8. run
95
Sample Listing Report Example
title 'Salary Analysis' proc report dataia.crew
nowd column JobCode Location Salary
define Salary / 'Annual Salary' format
dollar8. run
Salary Analysis
Annual JobCod Location
Salary e PILOT1 LONDON 72,000
FLTAT3 CARY 41,000 PILOT2
FRANKFURT 81,000 PILOT2 FRANKFURT
83,000 FLTAT2 LONDON
36,000 PILOT1 LONDON 65,000
FLTAT2 FRANKFURT 35,000 FLTAT2
FRANKFURT 38,000 . . .

Use one /, followed by all attributes in any
order.
96
The DEFINE Statement
  • Selected attributes
  • The default width is
  • the variable length for character variables
  • 9 for numeric variables
  • the format width if there is a format stored in
    the descriptor portion of the data set.

WIDTH controls the width of a report column.
? The WIDTH option enables you to change the
width of JobCode so that the e is not on a
separate line.
97
Sample Listing Report Example
title 'Salary Analysis' proc report dataia.crew
nowd column JobCode Location Salary
define Salary / 'Annual Salary' format
dollar8. define JobCode / width 8 run
Salary Analysis
Annual JobCode Location
Salary PILOT1 LONDON 72,000
FLTAT3 CARY 41,000 PILOT2
FRANKFURT 81,000 PILOT2 FRANKFURT
83,000 FLTAT2 LONDON
36,000 PILOT1 LONDON 65,000
FLTAT2 FRANKFURT 35,000 FLTAT2
FRANKFURT 38,000 . . .
The order of the DEFINE statements does not
matter.
98
Enhancing the Listing Report Example
  • Change column headings.
  • Increase the column widths.
  • Add a format to display Salary with dollar signs
    and commas.

proc report dataia.crew nowd column JobCode
Location Salary define JobCode / width8 'Job
Code' define Location / 'Home Base'
define Salary / formatdollar10. run
...
99
Enhancing the Listing Report Example
Partial SAS Output
Job Code Home Base
Salary PILOT1 LONDON
72,000 FLTAT3 CARY
41,000 PILOT2 FRANKFURT
81,000 PILOT2 FRANKFURT
83,000 FLTAT2 LONDON
36,000 PILOT1 LONDON
65,000 FLTAT2
FRANKFURT 35,000 FLTAT2
FRANKFURT 38,000
FLTAT1 LONDON 28,000
. . .
100
Enhancing the Listing Report Example
Change the report to group the pilots and flight
attendants.
Job Code Home Base
Salary PILOT1 LONDON
72,000 FLTAT3 CARY
41,000 PILOT2 FRANKFURT
81,000 PILOT2 FRANKFURT
83,000 FLTAT2 LONDON
36,000 PILOT1 LONDON
65,000 FLTAT2
FRANKFURT 35,000 FLTAT2
FRANKFURT 38,000
FLTAT1 LONDON 28,000
. . .
101
ORDER Usage Type
  • Selected attributes
  • The ORDER attribute
  • orders the report in ascending order. Include the
    DESCENDING option in the DEFINE statement to
    force the order to be descending.
  • suppresses repetitious printing of values.
  • does not need data to be sorted previously.

ORDER orders the rows in the report.
102
ORDER Usage Type Example
  • Display the data in order by JobCode.

proc report dataia.crew nowd column JobCode
Location Salary define JobCode / order
width8 'Job Code' define Location / 'Home
Base' define Salary / formatdollar10. run
103
ORDER Usage Type Example
Partial SAS Output
Salary Analysis Job Code Home
Base Salary FLTAT1
LONDON 28,000
FRANKFURT 25,000
CARY 23,000
. . . FRANKFURT
27,000 LONDON
22,000 FLTAT2 LONDON
36,000
FRANKFURT 35,000
. . . FRANKFURT
33,000 CARY
38,000
The values of FLTAT are not repeated for each
row they are suppressed.
104
ORDER Usage Type Example
Display the data in descending order by
JobCode. The DESCENDING keyword can go
anywhere in the DEFINE statement after the /. It
cannot be abbreviated.
proc report dataia.crew nowd column JobCode
Location Salary define JobCode / descending
order width8 'Job Code'
define Location / 'Home Base' define Salary /
formatdollar10. run
105
ORDER Usage Type Example
Partial SAS Output
Salary Analysis Job Code Home
Base Salary PILOT3
LONDON 108,000
CARY 112,000
LONDON 94,000
. . . PILOT2
FRANKFURT 81,000
FRANKFURT 83,000
. . . PILOT1 LONDON
72,000 LONDON
65,000 CARY
71,000 . . .
106
ORDER Usage Type Example
What if you also want Location in sorted order?
Salary Analysis Job Code Home
Base Salary FLTAT1
LONDON 28,000
FRANKFURT 25,000
CARY 23,000
. . . FRANKFURT
27,000 LONDON
22,000 FLTAT2 LONDON
36,000
FRANKFURT 35,000
. . .
107
ORDER Usage Type Example
  • Display the data in order by JobCode and Location.

proc report dataia.crew nowd column JobCode
Location Salary define JobCode / order
width8 'Job Code' define Location / order
'Home Base' define Salary /
formatdollar10. run
108
ORDER Usage Type Example
  • Output

Salary Analysis Job Code
Home Base Salary FLTAT1
CARY 23,000
21,000
. . . FRANKFURT
25,000
22,000 . . .

LONDON 28,000
29,000
24,000

25,000
22,000 FLTAT2 CARY
37,000
34,000
33,000 . . .
FRANKFURT 35,000

38,000 . . .

109
ORDER Usage Type Example
  • How did SAS know to group Location in JobCode?

proc report dataia.crew nowd column JobCode
Location Salary define JobCode / order
width8 'Job Code' define Location / order
'Home Base' define Salary /
formatdollar10. run
110
ORDER Usage Type Example
  • How did SAS know to group Location in JobCode?

proc report dataia.crew nowd column JobCode
Location Salary define JobCode / order
width8 'Job Code' define Location / order
'Home Base' define Salary /
formatdollar10. run
The COLUMN statement selects and controls the
order of the variables in the output.
111
ORDER Usage Type Example
How did SAS know to group Location in
JobCode? Specify Location before JobCode in
the COLUMN statement.
proc report dataia.crew nowd column Location
JobCode Salary define JobCode / order width8
'Job Code' define Location / order 'Home
Base' define Salary / formatdollar10. run
112
ORDER Usage Type Example
Specify Location before JobCode in the COLUMN
statement.
Salary Analysis Home Base
Job Code Salary CARY
FLTAT1 23,000
21,000
29,000
30,000
28,000
FLTAT2 37,000
34,000
33,000
. . . FRANKFURT
FLTAT1 25,000
22,000
26,000
27,000
FLTAT2 35,000
38,000
33,000
. . .

113
Exercise
  • This exercise reinforces the concepts discussed
    previously.

114
Exercises
  • Using the StudyLocations data set that you
    created earlier and PROC REPORT, create the
    following report
  • Display the variables in the following
    orderCountry, Length of Program, Trip Begin
    Date, and Trip Cost
  • Format
  • the Trip Cost appropriately as currency
  • the Trip Begin Date so that December 1, 2007 will
    appear as 01/12/2007.
  • Give an appropriate width for other variables
  • Order the rows by Country.
  • Title the report Study Abroad Options.

115
Exercises
title 'Study Abroad Options' proc report
dataStudyLocations nowd column country time
begindate cost define beginDate
/formatddmmyy10. define country / order run
116
Exercises
Partial Output
117
Business Task
International Airlines wants to summarize Salary
by JobCode for each Location.
118
Desired Report
Salary Analysis Job Code Home Base
Salary FLTAT1 CARY 131,000
FRANKFURT 100,000
LONDON 128,000 FLTAT2 CARY
245,000 FRANKFURT
181,000 LONDON
206,000 FLTAT3 CARY
217,000 FRANKFURT
134,000 LONDON
180,000 PILOT1 CARY
211,000 FRANKFURT
135,000 LONDON
210,000 PILOT2 CARY
323,000 FRANKFURT
240,000 LONDON
158,000 PILOT3 CARY
300,000 FRANKFURT
205,000 LONDON
294,000

3,598,000
You want one line for each flight attendant from
Cary and the total salary.
119
The DEFINE Statement - Review
  • General form of the DEFINE statement in PROC
    REPORT
  • The USAGE attribute is necessary to produce this
    summary report.

DEFINE variable / ltusagegt ltattribute-listgt
120
The DEFINE Statement USAGE Attribute
  • By default in PROC REPORT,
  • character variables have a display usage and
    produce a listing report. (Each row is listed and
    there is no summarization or collapsing of rows.)
  • numeric variables have an analysis usage and
    produce summary reports.

Variable Type Default Usage Report Produced
Character Display Listing
Numeric Analysis Summary
121
The DEFINE Statement USAGE Attribute
  • The analysis usage for numeric variables
  • uses a default statistic of SUM (You can choose a
    different statistic.)
  • has no effect when you produce a report that
    contains character variables by default
  • Character data has a display usage by default.
  • If you have at least one column with a display
    usage, you get a listing report.

122
The DEFINE Statement USAGE Attribute
  • If your data set has one character display
    column, PROC REPORT will output a listing report
    by default, regardless of the number of numeric
    columns.

VariableType Default Usage Report Produced
Character Display Listing
Numeric Analysis Summary
123
Character and Numeric Variables
Display Usage Type (Character Variable Default)
Analysis Usage Type (Numeric Variable Default)
Listing Report Produced
Report
JobCode Salary PILOT1 72000
FLTAT3 41000 PILOT2 81000 PILOT2
83000 FLTAT2 36000 PILOT1
65000
The default statistic is SUM.
...
124
Numeric Variables Only
Analysis Usage SUM Statistic
Summary Report Produced
Report
Original Data Set
Salary 378000
Sum of all Salary values in the data set
Why did you get a summary report?
...
125
Defining Group Variables
  • To have character columns appear in the
    summarized report, use the GROUP attribute.

126
Defining Group Variables
  • In order for grouping to take affect, the word
    group must be placed in the DEFINE statement for
    every character variable.

Example
proc report dataia.crew nowd column JobCode
Location Salary define JobCode / group
width8 'Job Code' define Location / group
'Home Base' define Salary /
formatdollar10. run
127
Defining Group Variables
  • All observations whose group variables have the
    same values are collapsed into a single row in
    the report.

128
Defining Group Variables
Listing Report Produced
JobCode as Display Usage
Analysis Usage SUM Statistic
Report
Original Data Set
JobCode Salary PILOT1 72000
FLTAT3 41000 PILOT2 81000 PILOT2
83000 FLTAT2 36000 PILOT1
65000
Report
Summary Report Produced
JobCode Salary FLTAT2 36000
FLTAT3 41000 PILOT1 137000
PILOT2 164000
JobCode as Group Usage
? FLTAT2 is in both reports.
...
129
Defining Group Variables
  • As you saw with the ORDER option, nesting of
    group variables is determined by the order of the
    variables in the COLUMN statement.
  • Example

proc report dataia.crew nowd column JobCode
Location Salary define JobCode / group
width8 'Job Code' define Location / group
'Home Base' define Salary /
formatdollar10. run
130
Summarizing the Data
Partial SAS Output
Salary Analysis Job Code Home Base
Salary FLTAT1 CARY
131,000 FRANKFURT
100,000 LONDON
128,000 FLTAT2 CARY
245,000 FRANKFURT
181,000 LONDON
206,000 FLTAT3 CARY
217,000 FRANKFURT
134,000 LONDON
180,000 PILOT1 CARY
211,000 FRANKFURT
135,000 LONDON
210,000 PILOT2 CARY
323,000 FRANKFURT
240,000 LONDON
158,000 PILOT3 CARY
300,000 FRANKFURT
205,000 LONDON 294,000
131
Defining Group Variables
Analysis Usage SUM Statistic
Original Data Set
Location as Group Usage
JobCode as Group Usage
Report
Salary Analysis JobCode Location
Salary FLTAT2 CARY 67000 FLTAT3
CARY 85000 FRANKFURT
93000
...
132
Defining Group Variables
  • List Location before JobCod
Write a Comment
User Comments (0)
About PowerShow.com