lesson05 - Lesson 5 - Topics Formatting Output Creating new...

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

View Full Document Right Arrow Icon
Lesson 5 - Topics Formatting Output Creating new variables Programs 5-7 in course notes LSB 3:1,5,6; 4:1,5-7; 5:4
Background image of page 1

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

View Full DocumentRight Arrow Icon
Annotating SAS Output TITLE statements - label procedure output LABEL statements - label names of variables FORMAT statements - label values of variables
Background image of page 2
Standard Output The FREQ Procedure Cumulative Cumulative clinic Frequency Percent Frequency Percent ----------------------------------------------------------- A 18 18.00 18 18.00 B 29 29.00 47 47.00 C 36 36.00 83 83.00 D 17 17.00 100 100.00 Annotated Output Number of Patients by Clinic The FREQ Procedure Clinical Center Cumulative Cumulative clinic Frequency Percent Frequency Percent ---------------------------------------------------------------- Birmingham 18 18.00 18 18.00 Chicago 29 29.00 47 47.00 Minneapolis 36 36.00 83 83.00 Pittsburgh 17 17.00 100 100.00 TITLE LABEL for clinic FORMAT for clinic
Background image of page 3

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

View Full DocumentRight Arrow Icon
Standard Output The FREQ Procedure Cumulative Cumulative sebl_6 Frequency Percent Frequency Percent ----------------------------------------------------------- 1 70 70.00 70 70.00 2 23 23.00 93 93.00 3 6 6.00 99 99.00 4 1 1.00 100 100.00 Annotated Output The FREQ Procedure Patient Report Headaches Cumulative Cumulative sebl_6 Frequency Percent Frequency Percent ------------------------------------------------------------- None 70 70.00 70 70.00 Mild 23 23.00 93 93.00 Moderate 6 6.00 99 99.00 Severe 1 1.00 100 100.00 LABEL for sebl_6
Background image of page 4
TITLE STATEMENTS PROC FREQ DATA =tdata; TABLES clinic group sex educ sebl_1 sebl_6; TITLE 'Distribution of Selected Variables' ; TITLE2 'on the TOMHS Dataset' ; RUN ; TITLE statements can go anywhere in the program. Good practice to put under PROC Can change the titles at any time TITLE(n)' text ' is general syntax
Background image of page 5

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

View Full DocumentRight Arrow Icon
Label Statements LABEL clinic = 'Clinical Center' ; LABEL group = 'Drug Treatment Group' ; LABEL educ = 'Highest Education Attained' ; LABEL sebl_1 = 'Patient Report Drowsiness' ; LABEL sebl_6 = 'Patient Report Headaches' ; Label statements can go anywhere in the datastep or under a procedure (But not in-between!)
Background image of page 6
Format Statements FORMAT brthdate mmddyy10. ; FORMAT clinic $clinicF. ; FORMAT group groupF. ; FORMAT fever headache seF. ; Tells SAS to display the values of the variable according to the format. Format statements can go anywhere in the datastep or in a procedure There are build in formats (e.g. dates) and user defined formats. A format can apply to more than one variable. Formats end with a period (.) Character formats begin with a $
Background image of page 7

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

View Full DocumentRight Arrow Icon
How to Make User Defined FORMATS PROC FORMAT ; VALUE groupF 1 = 'Beta Blocker' 2 = 'Calcium Channel Blocker' 3 = 'Diuretic' 4 = 'Alpha Blocker' 5 = 'ACE Inhibitor' 6 = 'Placebo' ; VALUE genderF 1 = 'Men' 2 = 'Women' ; VALUE seF 1 = 'None' 2 = 'Mild’ 3 = 'Moderate' 4 = 'Severe' ; The format name does NOT have to be the name of a variable on the dataset. It cannot end Name of format
Background image of page 8
PROC FORMAT ; VALUE $clinicF
Background image of page 9

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

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

This note was uploaded on 11/21/2011 for the course PUBH 6420 taught by Professor Greggrandis during the Fall '11 term at University of Florida.

Page1 / 29

lesson05 - Lesson 5 - Topics Formatting Output Creating new...

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

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