NonParametric Statistics using SAS
2 List the components of a SAS program. Open an existing SAS program and run it. Objectives
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 DATA one; INPUT Name $ Gender $ Runtime Age Weight ; DATALINES; Donna F Gracie F Luanne F Mimi F Chris M ; RUN; PROC PRINT DATA=one; RUN; PROC REG DATA=one; MODEL Runtime=Weight; RUN; DATA Step PROC Steps SAS Programs
5 Interactive windows enable you to interface with SAS. SAS Windowing Environment
6 Open the SAS program “example.sas.” Submit the program and examine the results. Data for today's class located at Exercises
7 Learn the two fundamental SAS syntax programming rules. Write a Data Step to read a data file. Objectives
8 SAS statements have these characteristics: usually begin with an identifying keyword always end with a semicolon DATA staff; INPUT LastName $ FirstName $ JobTitle $ Salary; DATALINES; …insert text here… RUN; PROC PRINT DATA=staff; RUN; Fundamental SAS Syntax Rules
Example of a typical text data set. Name Gender Runtime Age Weight Donna F Gracie F Luanne F Mimi F Chris M
DATA one; INPUT Name $ Gender $ Runtime Age Weight; DATALINES; Donna F Gracie F Luanne F Mimi F Chris M ; RUN; PROC PRINT DATA=one; RUN; Creating a SAS data set: The Data Step
Veneer Data brand wear Acme 2.3 Acme 2.1 Acme 2.4 Acme 2.5 Acme 2.2 Acme 2.0 Champ 2.2 Champ 2.3 Champ 2.4 …
12 Write a SAS program to read the data located in the “veneer.txt“ text file. Exercises
Nonparametric ANOVA
Objectives Recognize when nonparametric analysis is appropriate. Perform nonparametric analysis with the NPAR1WAY procedure.
Nonparametric Analysis Nonparametric analyses are those that rely only on the assumption that the observations are independent. Normality not required Variances do not have to be equal Small sample sizes ok Dependant variable can be ordinal
Hypotheses of Interest
Rank Scores
Median Scores Median = 8.5
THE NPAR1WAY PROCEDURE PROC NPAR1WAY DATA=SAS-data-set ; CLASS variable; VAR variables; RUN;
Veneer Data brand wear Acme 2.3 Acme 2.1 Acme 2.4 Acme 2.5 Acme 2.2 Acme 2.0 Champ 2.2 Champ 2.3 Champ 2.4 …
Veneer Example Are there differences between the durability of brands of wood veneer?
22 The nonparm.sas program contains several of the most common SAS procedures used your class. During the remainder of this class, we will open that SAS program discuss the function of each of the procedures and demo it in SAS. SAS Procedures