CH12 - STAT1303A Data Management 12. Data Presentation 12...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: STAT1303A Data Management 12. Data Presentation 12 Data Presentation In many occasions, nice formatted reports are required. For example, PROC FREQ and PROC MEANS can give summary statistics reports. However, they are rather primitive in terms of report formats and layouts. Consequently, in this chapter, we consider the enhancement of the appearance of reports in two possible ways: (1) Labels and formats can improve the quality of report output by adding more meaningful headings and data value descriptions (2) PROC TABULATE generates more &exible reports for categorical and numerical data. To demonstrate the e/ect of data presentation, we consider the coding scheme facilities the data entry process. Variable Code TYPE 1 = Imports 2 = Retained imports 3 = Re-exports Usually, the codes used are too short to bear the meaning behind the codes. However, in the data presentation reports to non-technical personnel, we do not want to have only the codes ¡1¢or ¡2¢because others do not know the meanings behind them. Furthermore, the codes cannot be understood easily in some applications. Therefore, more descriptive information on the data values is desired in the reports. A typical PROC MEANS report is given by The MEANS Procedure Analysis Variable : amount year category type Sum------------------------------------------------------------ 1995 1 1 61158.00 2 42953.00 3 19534.00 2 1 562415.00 2 142897.00 3 546247.00 ... 2000 1 1 63671.00 2 45740.00 3 19705.00 ... HKU STAT1303A (2009-10, Semester 1) 12 & 1 STAT1303A Data Management 12. Data Presentation A more descriptive PROC MEANS report is given by The MEANS Procedure Analysis Variable : amount year End-use category Trading type Sum-------------------------------------------------------------------- 1995 Capital goods Imports 297878.00 Re-exports 200125.00 Retained imports 133575.00 Consumer goods Imports 562415.00 Re-exports 546247.00 Retained imports 142897.00 ... 2000 Capital goods Imports 417622.00 Re-exports 334682.00 Retained imports 157239.00 ... 12.1 Label Data Values in Data Step 12.1.1 Labelling Numeric Values Suppose a data set TRADE consists of YEAR, CATEGORY, TYPE and AMOUNT. The PROC MEANS is applied to produce the sum of AMOUNT under various levels of YEAR, CATEGORY and TYPE. This is demonstrated by Example 12.1. Example 12.1. Raw output of the sum of AMOUNT under various levels of YEAR, CATEGORY and TYPE. * Example 12.1 trade data set; data trade; input year category type amount; cards; 1995 1 1 61158 ... ; proc means data=trade nonobs sum; var amount; class year category type; run; Clearly, the output by this procedure is rather rough and not easy to read. The report can be improved by the speci&cation of data labels. To label data values, one method is to create new variables (which are more descriptive) by using the IF-THEN-ELSE statement in Data Step....
View Full Document

Page1 / 15

CH12 - STAT1303A Data Management 12. Data Presentation 12...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online