CSULB_STAT475_handout9

CSULB_STAT475_handout9 - STAT 475 Chapter 8 CREATING...

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

View Full Document Right Arrow Icon
STAT 475 Chapter 8 CREATING ENHANCED LIST AND SUMMARY REPORTS A more sophisticated way to produce a listing of the report is to use PROC REPORT . The syntax is proc report data= dataname <options>; <column statement>; <where statement>; <define statement>; run; Options include WINDOWS (or WD ) – the report appears in the REPORT window (this is a default in SAS). NOWINDOWS ( or NOWD ) – the report appears in the OUTPUT window, and no REPORT window is opened. Example. In the exercise example, type proc report nowd; run; The output displayed in the OUTPUT window is ID Age ActLevel Sex Payment 2810 61 MOD F 34 2804 38 HIGH F 29 2807 42 LOW M 27.5 2816 26 HIGH M 20.25 2833 32 MOD F 15.5 2823 29 HIGH M 23 The COLUMN statement may be used to select and order the variables to be displayed in the report. Example. In the exercise example, type proc report nowd; column ID ActLevel Payment Sex Age; 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
run; The output displayed in the OUTPUT window is ID ActLevel Payment Sex Age 2810 MOD 34 F 61 2804 HIGH 29 F 38 2807 LOW 27.5 M 42 2816 HIGH 20.25 M 26 2833 MOD 15.5 F 32 2823 HIGH 23 M 29 The WHERE statement may be used to select certain observations that appear in the report. Example. In the exercise example, type proc report nowd; where Sex= ' F ' ; run; The output displayed in the OUTPUT window is ID Age ActLevel Sex Payment 2810 61 MOD F 34 2804 38 HIGH F 29 2833 32 MOD F 15.5 The DEFINE statement may be used to describe how to display variables in the report. The syntax is define variablename / <usage> <attributes> <options> <justification><heading>; where o usage specifies how to use the variable. Valid options are DISPLAY, ANALYSIS, ORDER, GROUP, ACROSS, or COMPUTED. o attributes specifies attributes for the variable, including FORMAT, WIDTH and SPACING. o options specifies formatting options, including DESCENDING and NOPRINT. o justification specifies column justification (CENTER, LEFT, or RIGHT). 2
Background image of page 2
o heading specifies a label for the column heading. Note that usage, attributes, options, justification, and label may be listed in any order. DEFINING VARIABLE USAGE PROC REPORT uses each variable in one of six ways (DISPLAY, ANALYSIS, ORDER, GROUP, ACROSS, or COMPUTED). By default, SAS uses character variables as display variables , and numeric variables as analysis variables , which are used to calculate the SUM statistic. Rows in a report are ordered according to an
Background image of page 3

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

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

Page1 / 10

CSULB_STAT475_handout9 - STAT 475 Chapter 8 CREATING...

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

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