# lesson03 - Lesson 3 Overview Descriptive Procedures PRINT,...

This preview shows pages 1–7. Sign up to view the full content.

Lesson 3 Overview Descriptive Procedures PRINT, MEANS, UNIVARIATE, SGPLOT Controlling SAS Output Program 3 in course notes LSB 4:1-4,9; 5:1-2;8:1-4,7-8

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

View Full Document
Descriptive Procedures In SAS PROC PRINT Displays your data PROC MEANS Statistics for numeric variables PROC UNIVARIATE Detailed statistics for numeric variables PROC FREQ Frequency counts for categorical variables PROC (G)PLOT X-Y Plots PROC (G)CHART Bar charts PROC SGPLOT New all-purpose plotting procedure (LSB, Version 9.2)
Syntax for Procedures PROC PROCNAME DATA= datasetname <options> ; substatements/<options> ; The WHERE statement is a useful substatement available to all procedures. PROC PRINT DATA =demo ; VAR marstat ; WHERE state = 'MN' ;

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

View Full Document
DATA weight; INFILE ‘C:\SAS_Files\tomhs.dat' ; INPUT @ 1 ptid \$10. @ 12 clinic \$1. @ 30 sex \$1. @ 58 height 4. @ 85 weight 5. ; bmi = (weight* 703.0768 )/(height*height); * BMI is calculated in kg/m 2 ; RUN ; Program 3
PROC PRINT DATA = weight ( OBS = 5 ); TITLE 'Proc Print: Five observations from the TOMHS Study' ; RUN ; PROC MEANS DATA = weight; VAR height weight bmi; TITLE 'Proc Means Example 1' ; RUN ; PROC MEANS DATA = weight MEAN MEDIAN STD MAXDEC = 2 ; VAR height weight bmi; TITLE 'Proc Means Example 2 (specifying options)' ; RUN ; Page 27 of Cody/Smith lists statistics available Page 242 of Little SAS Book (4 th edition) Also see online help under proc means

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

View Full Document
Proc Print: Five observations from the TOMHS Study obs ptid clinic sex height weight bmi 1 C03615 C 1 71.5 205.5 28.2620 2 B00979 B 1 69.5 247.3 35.9963 3 B00644 B 1 60.0 138.5 27.0489 4 D01348 D 1 71.5 205.5 28.2620 5 A01088 A 1 72.0 244.8 33.2008 Proc Means Example 1 The MEANS Procedure Variable N Mean Std Dev Minimum Maximum -------------------------------------------------------------------------- height 100 68.0750000 3.8536189 58.0000000 77.0000000 weight 100 191.7560000 34.5107254 128.5000000 279.3000000 bmi 100 28.9808397 3.9911476 21.4572336 37.5178852 --------------------------------------------------------------------------
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 / 25

lesson03 - Lesson 3 Overview Descriptive Procedures PRINT,...

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

View Full Document
Ask a homework question - tutors are online