nonparametric statistics using sas. 2 list the components of a sas program. open an existing sas...

22
NonParametric Statistics using SAS

Post on 21-Dec-2015

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

NonParametric Statistics using SAS

Page 2: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

2

List the components of a SAS program. Open an existing SAS program and run it.

Objectives

Page 3: 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.

RawData

RawData

DATAStep

DATAStep

ReportReport

SASDataSet

SASDataSet

PROCStep

PROCStep

SAS Programs

Page 4: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

4

DATA one; INPUT Name $ Gender $ Runtime Age Weight ;

DATALINES;Donna F 8.17 42 68.15 Gracie F 8.63 38 81.87Luanne F 8.65 43 85.84Mimi F 8.92 50 70.87Chris M 8.95 49 81.42;RUN;

PROC PRINT DATA=one;RUN;

PROC REG DATA=one;MODEL Runtime=Weight;RUN;

DATAStep

PROCSteps

SAS Programs

Page 5: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

5

Interactive windows enable you to interface with SAS.

SAS Windowing Environment

Page 6: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

6

Open the SAS program “example.sas.”

Submit the program and examine the results.

Data for today's class located at

http://www.missouri.edu/~baconr/sas

Exercises

Page 7: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

7

Learn the two fundamental SAS syntax programming rules.

Write a Data Step to read a data file.

Objectives

Page 8: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. 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

Page 9: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

Example of a typical text data set.

Name Gender Runtime Age WeightDonna F 8.17 42 68.15 Gracie F 8.63 38 81.87Luanne F 8.65 43 85.84Mimi F 8.92 50 70.87Chris M 8.95 49 81.42

Page 10: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

DATA one; INPUT Name $ Gender $ Runtime Age Weight;

DATALINES;Donna F 8.17 42 68.15 Gracie F 8.63 38 81.87Luanne F 8.65 43 85.84Mimi F 8.92 50 70.87Chris M 8.95 49 81.42;RUN;

PROC PRINT DATA=one;RUN;

Creating a SAS data set: The Data Step

Page 11: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

Veneer Data

brand wear Acme 2.3Acme 2.1Acme 2.4Acme 2.5Acme 2.2Acme 2.0Champ 2.2Champ 2.3Champ 2.4…

Page 12: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

12

Write a SAS program to read the data located in the “veneer.txt“ text file.

Exercises

Page 13: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

Nonparametric ANOVA

Page 14: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

ObjectivesRecognize when nonparametric analysis

is appropriate.

Perform nonparametric analysis with the NPAR1WAY procedure.

Page 15: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

Nonparametric AnalysisNonparametric 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

Page 16: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

Hypotheses of Interest

H0:all populationsare identical

H1:all populations are

not identical.

Page 17: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

Rank Scores

Treatm ent Response

RankScore

A A A A A 2 5 7 8 10

SUM SUM

19 36

Page 18: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

Median Scores

Treatm ent

Response

M edianScore

A A A A A 2 5 7 8 10

SUM SUM

1 4

Median = 8.5 Median = 8.5

Page 19: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

THE NPAR1WAY PROCEDURE

PROC NPAR1WAY DATA=SAS-data-set <options>;CLASS variable;VAR variables;

RUN;

Page 20: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

Veneer Data

brand wear Acme 2.3Acme 2.1Acme 2.4Acme 2.5Acme 2.2Acme 2.0Champ 2.2Champ 2.3Champ 2.4…

Page 21: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

Veneer ExampleAre there differences between the durability of brands of wood veneer?

Page 22: NonParametric Statistics using SAS. 2 List the components of a SAS program. Open an existing SAS program and run it. Objectives

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