{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

unit_5_2007

# unit_5_2007 - Introduction to SAS Programming STSCI501 Fall...

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

1 Introduction to SAS Programming STSCI501 – Fall 2006 Simona Despa Cornell Statistical Consulting Unit (CSCU)

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

View Full Document
2 PART 5 SAS Procedures Overview Sorting Printing Summarizing your data Using Basic Statistical Procedures
3 SAS Proc’s What are SAS PROC’s: a library of prewritten routines (procedures) that perform tasks on SAS data sets. For example, you can use PROC steps to print a report produce descriptive statistics create a tabular report produce plots and charts .

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

View Full Document
4 SAS Proc’s Procedures for sorting printing and summarizing data PROC SORT; PROC PRINT; PROC FORMAT; PROC TABULATE; PROC REPORT; PROC MEANS; PROC FREQ;
5 Syntax of SAS Proc’s PROC < Name of Procedure > data=< data set name > options ; Additional procedure statements; Title; By <variable>; Label statement; OUT=<data set name>; Run;

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

View Full Document
6 Syntax of SAS Proc’s: The Proc Statement PROC < Name of Procedure > data=< data-set-name > options; Example: PROC PRINT DATA=cars heading=vertical; Run; Name of proc Name of data set Option for column heading direction
7 Syntax of SAS Proc’s: The By Statement In Proc SORT: BY tells SAS how to arrange the observations In all other procedures: BY tells SAS what groups of observations are to be analyzed separately; Example : Proc print data=cars; BY Type; Run; Tells SAS to print each Type separately

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

View Full Document
8 Syntax of SAS Proc’s: Title and Label Statements proc print data= Cars heading=vertical; by Type; TITLE “Here’s the Cars data set by Type"; LABEL Type=“Size of the Car”; run ; Titles remain in effect until you replace them with a new title or use a null title statement; Null title : TITLE ; Up to 10 titles can be used by adding the corresponding numbers to the title keyword: proc print data=Cars noobs; title1 ' Here’s the Cars data set by Type '; title2 ‘Here’s a second title'; run;
9 Syntax of SAS Proc’s: Title and Label Statements

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

View Full Document
10 Syntax of SAS Proc’s: Title and Label Statements By default SAS prints the SAS variable names to label the output.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 33

unit_5_2007 - Introduction to SAS Programming STSCI501 Fall...

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

View Full Document
Ask a homework question - tutors are online