The NPAR1WAY Procedure

[Pages:10]Chapter 47

The NPAR1WAY Procedure

Chapter Table of Contents

OVERVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2507

GETTING STARTED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2507

SYNTAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2517 PROC NPAR1WAY Statement . . . . . . . . . . . . . . . . . . . . . . . . . 2517 BY Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2519 CLASS Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2520 EXACT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2520 FREQ Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2522 OUTPUT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2522 VAR Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2523

DETAILS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2524 Missing Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2524 Tied Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2524 Statistical Computations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2525 Simple Linear Rank Tests for Two-Sample Data . . . . . . . . . . . . . . 2525 One-Way ANOVA Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . 2526 Scores for Linear Rank and One-Way ANOVA Tests . . . . . . . . . . . . 2527 Statistics Based on the Empirical Distribution Function . . . . . . . . . . 2529 Exact Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2531 Output Data Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2535 Displayed Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2539 ODS Table Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2542

EXAMPLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2544 Example 47.1 Two-Sample Location Tests and EDF Statistics . . . . . . . . 2544 Example 47.2 The Exact Wilcoxon Two-Sample Test . . . . . . . . . . . . . 2548 Example 47.3 The Exact Savage Multisample Test . . . . . . . . . . . . . . 2550

REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2551

2506 Chapter 47. The NPAR1WAY Procedure

SAS OnlineDocTM: Version 8

Chapter 47

The NPAR1WAY Procedure

Overview

The NPAR1WAY procedure performs nonparametric tests for location and scale differences across a one-way classification. PROC NPAR1WAY also provides a standard analysis of variance on the raw data and statistics based on the empirical distribution function.

PROC NPAR1WAY performs tests for location and scale differences based on the following scores of a response variable: Wilcoxon, median, Van der Waerden, Savage, Siegel-Tukey, Ansari-Bradley, Klotz, and Mood Scores. Additionally, PROC NPAR1WAY provides tests using the raw input data as scores. When the data are classified into two samples, tests are based on simple linear rank statistics. When the data are classified into more than two samples, tests are based on one-way ANOVA

statistics. Both asymptotic and exact p-values are available for these tests.

PROC NPAR1WAY also calculates the following empirical distribution function (EDF) statistics: the Kolmogorov-Smirnov statistic, the Cramer-von Mises statistic, and, when the data are classified into only two samples, the Kuiper statistic. These statistics test whether the distribution of a variable is the same across different groups.

Only asymptotic p-values are available for these tests.

Getting Started

This example illustrates how you can use PROC NPAR1WAY to perform a one-way

nonparametric analysis. The data consist of weight gain measurements for five dif-

ferent levels of gossypol additive. Gossypol is a substance contained in cottonseed shells, and these data were collected to study the effect of gossypol on animal nutrition.

The following DATA step statements create the SAS data set Gossypol:

data Gossypol; input Dose n; do i=1 to n; input Gain @@; output; end; datalines;

0 16 228 229 218 216 224 208 235 229 233 219 224 220 232 200 208 232

reported by Halverson and Sherwood (1932)

2508 Chapter 47. The NPAR1WAY Procedure

.04 11 186 229 220 208 228 198 222 273 216 198 213

.07 12 179 193 183 180 143 204 114 188 178 134 208 196

.10 17 130 87 135 116 118 165 151 59 126 64 78 94 150 160 122 110 178

.13 11 154 130 130 118 118 104 112 134 98 100 104

;

The data set Gossypol contains the variable Dose, which represents the amount of gossypol additive, and the variable Gain, which represents the weight gain.

Researchers are interested in whether there is a difference in weight gain among the different dose levels of gossypol. The following statements invoke the NPAR1WAY procedure to perform a nonparametric analysis of this problem.

proc npar1way data=Gossypol; class Dose; var Gain;

run;

The variable Dose is the CLASS variable, and the VAR statement specifies the variable Gain is the response variable. The CLASS statement is required, and you must name only one CLASS variable. You may name one or more analysis variables in the VAR statement. If you omit the VAR statement, PROC NPAR1WAY analyzes all numeric variables in the data set except for the CLASS variable, the FREQ variable, and the BY variables.

Since no analysis options are specified in the PROC NPAR1WAY statement, the WILCOXON, MEDIAN, VW, SAVAGE, and EDF options are invoked by default. The results of these analyses are shown in the following tables.

The NPAR1WAY Procedure

Analysis of Variance for Variable Gain Classified by Variable Dose

Dose

N

Mean

--------------------------------------

0

16

222.187500

0.04

11

217.363636

0.07

12

175.000000

0.1

17

120.176471

0.13

11

118.363636

Source DF Sum of Squares Mean Square

F Value Pr > F

-------------------------------------------------------------------

Among

4

140082.986077 35020.74652

55.8143 ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download