lesson03 - Lesson 3 Overview Descriptive Procedures PRINT...

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

View Full Document Right Arrow Icon
Lesson 3 Overview Descriptive Procedures PRINT, MEANS, UNIVARIATE, SGPLOT Controlling SAS Output Program 3 in course notes Cody & Smith (Chapter 2:A-C,E) LSB 4:1-4,9; 5:1-2;8:1-4,7-8
Image of page 1

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

View Full Document Right Arrow Icon
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)
Image of page 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' ;
Image of page 3

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

View Full Document Right Arrow Icon
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
Image of page 4
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
Image of page 5

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

View Full Document Right Arrow Icon
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
Image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern