Download presentation
Presentation is loading. Please wait.
Published byGarry Brooks Modified over 9 years ago
1
SAS ® ANOVA Essentials
2
2 List the components of a SAS program. Open an existing SAS program and run it. Objectives
3
3 DATA steps are typically used to create SAS data sets. PROC steps are typically used to process SAS data sets (that is, generate reports and graphs, edit data, and sort data). A SAS program is a sequence of steps that the user submits for execution. Raw Data DATA Step Report SAS Data Set PROC Step SAS Programs
4
4 data staff; infile 'raw-data-file'; input LastName $ 1-20 FirstName $ 21-30 JobTitle $ 36-43 Salary 54-59; run; proc print data=staff; run; proc means data=staff; class JobTitle; var Salary; run; DATA Step PROC Steps SAS Programs
5
5 data staff; infile 'raw-data-file'; input LastName $ 1-20 FirstName $ 21-30 JobTitle $ 36-43 Salary 54-59; run; proc print data=staff; proc means data=staff; class JobTitle; var Salary; run; Step Boundaries
6
6 Interactive windows enable you to interface with SAS. SAS Windowing Environment
7
7 Open the SAS program example.sas. Submit the program and examine the results. Exercises
8
8 Explain SAS syntax rules. State the naming conventions for SAS data sets and variables. Create a SAS data set from a text dataset from your textbook. Objectives
9
9 SAS statements have these characteristics: usually begin with an identifying keyword always end with a semicolon data work.staff; infile 'raw-data-file'; input LastName $ 1-20 FirstName $ 21-30 JobTitle $ 36-43 Salary 54-59; run; proc print data=work.staff; run; proc means data=work.staff; class JobTitle; var Salary; run; SAS Syntax Rules
10
10 Numeric values Variable names Variable values LastName FirstName JobTitle Salary TORRES JAN Pilot 50000 LANGKAMM SARAH Mechanic 80000 SMITH MICHAEL Mechanic 40000 WAGSCHAL NADJA Pilot 77500 TOERMOEN JOCHEN Pilot 65000 The data portion of a SAS data set is a rectangular table of character and/or numeric data values. Character values SAS Data Sets: SAS Variable Names can be up to 32 characters long, must start with a letter or underscore. Subsequent characters can be letters, underscores, or numerals.
11
11 Accessing Data Sources Data Entry Raw Data File Other Software File DATA Step SAS/ACCESS Software SAS Data Set FSEDIT FSVIEW Conversion Process
12
12 Data for this course is located on the CDROM at back of book and at http://apps.csom.umn.edu/Nachtsheim/5th/ Data for this course
13
DATA one; INPUT Name $ Gender $ Runtime Age Weight Oxygen_Consumption Run_Pulse Rest_Pulse Maximum_Pulse Performance; DATALINES; Donna F 8.17 42 68.15 59.57 166 40 172 14 Gracie F 8.63 38 81.87 60.06 170 48 186 13 Luanne F 8.65 43 85.84 54.3 156 45 168 13 Mimi F 8.92 50 70.87 54.63 146 48 155 11 Chris M 8.95 49 81.42 49.16 180 44 185 11 ; PROC PRINT DATA=one; RUN; Creating a SAS data set: DATALINES statement.
14
14 The ANOVA.txt file contains several of the most common SAS procedures used your class. During the remainder of this class, we will open that text file discuss the function of each of the procedures and demo it in SAS. SAS Procedures
15
15 SAS Online Documentation support.sas.com/documentation
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.