Top Banner
1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying Custom Formats
59

1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

Dec 27, 2015

Download

Documents

Nancy Collins
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

1

Chapter 5: Creating Summarized Output

5.1 Generating Summary Statistics

5.2 Creating a Summary Report with the Summary Tables Task

5.3 Creating and Applying Custom Formats

Page 2: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

2

Chapter 5: Creating Summarized Output

5.1 Generating Summary Statistics5.1 Generating Summary Statistics

5.2 Creating a Summary Report with the Summary Tables Task

5.3 Creating and Applying Custom Formats

Page 3: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

3

Objectives Create a summary table. Create a summary report. Export summary data to Excel.

Page 4: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

4

Business ScenarioManagement would like a report that includes a summary of profits for each product line and category. The report should be accessible as an HTML file or an Excel spreadsheet stored on a shared network drive.

Page 5: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

5

Summary Statistics TaskThe Summary Statistics task can be used to calculate summary statistics based on groups within the data. You can produce reports, graphs, and data sets as output.

Page 6: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

6

Summary Statistics TaskThe Summary Statistics task has both a wizard and a standard task dialog box that can be used to set up results.

Page 7: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

7

Summary Statistics: Task RolesUse the wizard to assign variables to roles.

Specify variables whosevalues define subgroups.

Compute statisticsfor each numericvariable in the list.

Page 8: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

8

Page 9: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

9

5.01 Multiple Answer PollWhich variables might be an appropriate choice for the Classification variable role?

a. State

b. PaymentAmount

c. AccountNumber

d. Month

Page 10: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

10

5.01 Multiple Answer Poll – Correct AnswersWhich variables might be an appropriate choice for the Classification variable role?

a. State

b. PaymentAmount

c. AccountNumber

d. Month

Page 11: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

11

Summary Statistics: Statistics and ResultsChoose statistics and results to include, including a report, graphics, and an output data set.

Page 12: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

12

Summary Statistics: Advanced ViewConverting the task in Advanced View enables additional options to further modify the output.

Page 13: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

13

Summarizing Data

This demonstration illustrates how to use the Summary Statistics task to summarize data, store the results in a summary table, and export the table to Microsoft Excel.

Page 14: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

14

Page 15: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

15

Exercise

This exercise reinforces the concepts discussed previously.

Page 16: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

16

Page 17: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

17

Chapter 5: Creating Summarized Output

5.1 Generating Summary Statistics

5.2 Creating a Summary Report with 5.2 Creating a Summary Report with the Summary Tables Task the Summary Tables Task

5.3 Creating and Applying Custom Formats

Page 18: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

18

Objectives Access the Summary Tables task. Specify a table layout and statistics. Define headings for columns and rows. Assign a label for missing values. Add titles to the report. Generate the tabular summary report.

Page 19: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

19

Business ScenarioTo better understand customer purchasing, the Orion marketing group would like a report that summarizes total profits for each customer age group and product category.

Page 20: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

20

Summary TablesThe Summary Tables wizard or task can be used to generate a tabular summary report.

Page 21: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

21

Summary Tables WizardThe Summary Tables wizard enables you to select analysis variable(s) and statistics, assign classification variables to define rows and columns, and specify totals.

Page 22: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

22

Page 23: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

23

5.02 QuizWhat would you like to change about the current results?

Page 24: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

24

5.02 Quiz – Correct AnswerWhat would you like to change about the current results?

Format OrderType values.

Eliminate redundantheaders.

Highlight the Total row witha different font and color.

Display missingvalues as **.

Page 25: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

25

Summary Tables: Advanced ViewUse the Summary Tables task in Advanced View to further modify the labels, fonts, and formats in the table results.

Page 26: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

26

Summary Tables: Modifying the Display

Page 27: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

27

Summary Tables: Results

Page 28: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

28

Creating a Tabular Summary Report

This demonstration illustrates how to use the Summary Tables task to generate descriptive statistics and display them in a tabular report.

Page 29: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

29

Page 30: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

30

Exercise

This exercise reinforces the concepts discussed previously.

Page 31: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

31

Page 32: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

32

Chapter 5: Creating Summarized Output

5.1 Generating Summary Statistics

5.2 Creating a Summary Report with the Summary Tables Task

5.3 Creating and Applying Custom Formats5.3 Creating and Applying Custom Formats

Page 33: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

33

Objectives Create user-defined formats. Apply user-defined formats.

Page 34: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

34

Business ScenarioRegional managers want to compare profits based on regions, rather than on individual countries. You can create and apply a user-defined format to summarize data based on labels rather than raw data values.

Region Countries

Africa ZA (South Africa)

Asia/Pacific IL (Israel), TR (Turkey), AU (Australia)

Europe DE (Germany)

North America US (United States), CA (Canada)Formattedvalues ofCountry

Formatted values of Order_Type

Page 35: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

35

User-Defined FormatsYou can create custom formats to display data values with more descriptive or alternative labels.

Page 36: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

36

User-Defined FormatsUser-defined formatting is a two-step process.

1. Create a format definition.

2. Apply the format to specific column(s).

Page 37: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

37

Create Format TasksTwo tasks are available to create a user-defined format. Create Format Create Format from Data Set

(new in SAS Enterprise Guide 4.3)

Page 38: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

38

Create Format: OptionsThe Create Format: Options window enables you to name the format and determine the type and storage location.

Page 39: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

39

Create Format: Define FormatsThe Define formats window enables you to define a list of labels that apply to discrete data values or ranges.

Page 40: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

40

Create Format from Data SetUse the Create Format from Data Set task to create a format based on values in an existing data source.

Page 41: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

41

User-Defined FormatsUser-defined formatting is a two-step process.

1. Create a format definition.

2. Apply the format to specific column(s).

Page 42: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

42

Applying Formats in Tasks (Review)You can apply custom formats in the same places that formats defined in SAS can be used.

Page 43: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

43

Applying Formats: User Defined CategoryThe User Defined category includes any formats either stored permanently or created during the current SAS Enterprise Guide session.

Page 44: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

44

Page 45: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

45

5.03 QuizWhat are some of the advantages of using user-defined formats?

Page 46: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

46

5.03 Quiz – Correct AnswerWhat are some of the advantages of using user-defined formats?

Possible Answers: Create the format once and use it wherever it is

applicable. Formats can be shared among users. Formats can be applied in tasks, queries, and

programs. Formats do not require the creation of additional

columns.

Page 47: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

47

Creating and Applying User-Defined Formats

This demonstration illustrates the creation and application of custom formats to summarize data.

Page 48: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

48

Page 49: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

49

5.04 Quiz (Live Web Only)1. Open the e105a1.egp project.

2. Double-click on the Create Format task to open it.

3. Select Define Formats and notice the two labels that are already defined and their corresponding ranges.

4. Add an additional label named Over 50 that includes the values 50 to High. (Select High from the list; do not type it.)

What must be changed to eliminate the red Xs over the range definitions?

Page 50: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

50

5.04 Quiz – Correct Answer1. Open the e105a1.egp project.

2. Double-click on the Create Format task to open it.

3. Select Define Formats and notice the two labels that are already defined and their corresponding ranges.

4. Add an additional label named Over 50 that includes the values 50 to High. (Select High from the list; do not type it.)

What must be changed to eliminate the red Xs over the range definitions?

Change inclusive toexclusive so ranges donot overlap.

Page 51: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

51

Page 52: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

52

Exercise

This exercise reinforces the concepts discussed previously.

Page 53: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

53

Page 54: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

54

Chapter Review1. In a wizard, you cannot modify the properties of a

column. What is another consideration for using a wizard versus the task dialog box, if both are available?

 

2. If the task dialog box offers so much more, then why use the wizard?

Page 55: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

55

Chapter Review Answers1. In a wizard, you cannot modify the properties of a

column. What is another consideration for using a wizard versus the task dialog box, if both are available?

 

2. If the task dialog box offers so much more, then why use the wizard?

The wizard does not have all the options/choices that are available in the task dialog box.

The wizard interface provides selections that can quickly generate a result, often with all the choices you need. If you do need additional options, then you can convert the wizard to Advanced View.

Page 56: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

56

Chapter Review3. In the Summary Statistics task, the analysis variable

must be a numeric variable. What type of variable is usually used in the Classification role?

 

4. Is a format only available in the project that defined it?

Page 57: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

57

Chapter Review Answers3. In the Summary Statistics task, the analysis variable

must be a numeric variable. What type of variable is usually used in the Classification role?

 

4. Is a format only available in the project that defined it?

A categorical variable is used in the Classification role. This is usually a character column such as State or Zip Code. It can be a numeric column such as Year, storing a four-digit year value, or Day_of_Week, storing the values 1 through 7, representing the different weekdays.

No, a format, if stored in a permanent location, is available to different projects, even different SAS Enterprise Guide users.

Page 58: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

58

Chapter Review5. When you create a character format, are the data

values case sensitive?

 

6. What are the three dimensions in a report from the Summary Tables task?

Page 59: 1 Chapter 5: Creating Summarized Output 5.1 Generating Summary Statistics 5.2 Creating a Summary Report with the Summary Tables Task 5.3 Creating and Applying.

59

Chapter Review Answers5. When you create a character format, are the data

values case sensitive?

 

6. What are the three dimensions in a report from the Summary Tables task?

Yes, the data values defined in the format must match the case of the stored data value.

The dimensions are Columns, Rows, and Pages.