Original Program from program editor.


********************************************************;
*** Steele & Torrie (1980) Table 7.1                 ***;
*** Nitrogen content of red clover plants inoculated ***;
***   with combination cultures of Rhizobium strains ***;
********************************************************;
*** This example was used to demonstrate one-way     ***;
*** ANOVA and is used again here to compare and      ***;
*** demonstrate some non-parametric alternatives     ***;
********************************************************;

options ps=256 ls=99 nocenter nodate nonumber;
TITLE1 'Examples of some nonparametric analyses';

data clover; infile cards missover;
     TITLE2 'Nitrogen content of red clover (S&T 1980)';
     LABEL treatment = 'Rhizobium inoculum';
     LABEL percent = 'Percent N content';
  input treatment $ 1-6 percent;
cards; run;
3DOk1   19.4
3DOk1   32.6
3DOk1   27.0
3DOk1   32.1
3DOk1   33.0
3DOk4   17.0
3DOk4   19.4
3DOk4    9.1
3DOk4   11.9
3DOk4   15.8
3DOk5   17.7
3DOk5   24.8
3DOk5   27.9
3DOk5   25.2
3DOk5   24.3
3DOk7   20.7
3DOk7   21.0
3DOk7   20.5
3DOk7   18.8
3DOk7   18.6
3DOk13  14.3
3DOk13  14.4
3DOk13  11.8
3DOk13  11.6
3DOk13  14.2
;

proc npar1way data=clover;
   TITLE3 'Demonstration of SAS NPAR1WAY';
    class treatment; var percent;
run;
quit;




Below is output from the SAS log (bold) and output from the SAS Output window.



1          ********************************************************;
2          *** Steele & Torrie (1980) Table 7.1                 ***;
3          *** Nitrogen content of red clover plants inoculated ***;
4          ***   with combination cultures of Rhizobium strains ***;
5          ********************************************************;
6          *** This example was used to demonstrate one-way     ***;
7          *** ANOVA and is used again here to compare and      ***;
8          *** demonstrate some non-parametric alternatives     ***;
9          ********************************************************;
10
11         options ps=256 ls=99 nocenter nodate nonumber;
12         TITLE1 'Examples of some nonparametric analyses';
13
14         data clover; infile cards missover;
15              TITLE2 'Nitrogen content of red clover (S&T 1980)';
16              LABEL treatment = 'Rhizobium inoculum';
17              LABEL percent = 'Percent N content';
18           input treatment $ 1-6 percent;
19         cards;
NOTE: The data set WORK.CLOVER has 25 observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

19       !        run;
45         ;
46
47         proc npar1way data=clover;
48            TITLE3 'Demonstration of SAS NPAR1WAY';
49             class treatment; var percent;
50         run;
NOTE: There were 25 observations read from the data set WORK.CLOVER.
NOTE: The PROCEDURE NPAR1WAY printed pages 1-6.
NOTE: PROCEDURE NPAR1WAY used (Total process time):
      real time           0.03 seconds
      cpu time            0.03 seconds
51         quit;
52
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
      real time           0.32 seconds
      cpu time            0.21 seconds




Examples of some nonparametric analyses
Nitrogen content of red clover (S&T 1980)
Demonstration of SAS NPAR1WAY

The NPAR1WAY Procedure

Analysis of Variance for Variable percent
    Classified by Variable treatment

treatment            N               Mean
-----------------------------------------
3DOk1                5             28.820
3DOk4                5             14.640
3DOk5                5             23.980
3DOk7                5             19.920
3DOk13               5             13.260

Source    DF    Sum of Squares    Mean Square     F Value    Pr > F
-------------------------------------------------------------------
Among      4         838.59760      209.64940     15.3776    <.0001
Within    20         272.66800       13.63340  

                Average scores were used for ties.


            Wilcoxon Scores (Rank Sums) for Variable percent
                    Classified by Variable treatment

                         Sum of      Expected       Std Dev          Mean
treatment       N        Scores      Under H0      Under H0         Score
-------------------------------------------------------------------------
3DOk1           5        106.50          65.0     14.716770         21.30
3DOk4           5         35.50          65.0     14.716770          7.10
3DOk5           5         89.00          65.0     14.716770         17.80
3DOk7           5         71.00          65.0     14.716770         14.20
3DOk13          5         23.00          65.0     14.716770          4.60
                   Average scores were used for ties.

   Kruskal-Wallis Test
Chi-Square         18.3523
DF                       4
Pr > Chi-Square     0.0011



   Median Scores (Number of Points Above Median) for Variable percent
                    Classified by Variable treatment
                         Sum of      Expected       Std Dev          Mean
treatment       N        Scores      Under H0      Under H0         Score
-------------------------------------------------------------------------
3DOk1           5          4.50          2.40      0.978093          0.90
3DOk4           5          0.50          2.40      0.978093          0.10
3DOk5           5          4.00          2.40      0.978093          0.80
3DOk7           5          3.00          2.40      0.978093          0.60
3DOk13          5          0.00          2.40      0.978093          0.00
                   Average scores were used for ties.

 Median One-Way Analysis
Chi-Square         13.9652
DF                       4
Pr > Chi-Square     0.0074



          Van der Waerden Scores (Normal) for Variable percent
                    Classified by Variable treatment

                         Sum of      Expected       Std Dev          Mean
treatment       N        Scores      Under H0      Under H0         Score
-------------------------------------------------------------------------
3DOk1           5      5.310985           0.0      1.812483      1.062197
3DOk4           5     -3.638749           0.0      1.812483     -0.727750
3DOk5           5      2.580554           0.0      1.812483      0.516111
3DOk7           5      0.592548           0.0      1.812483      0.118510
3DOk13          5     -4.845337           0.0      1.812483     -0.969067
                   Average scores were used for ties.

Van der Waerden One-Way Analysis
Chi-Square         17.5178
DF                       4
Pr > Chi-Square     0.0015



            Savage Scores (Exponential) for Variable percent
                    Classified by Variable treatment
                         Sum of      Expected       Std Dev          Mean
treatment       N        Scores      Under H0      Under H0         Score
-------------------------------------------------------------------------
3DOk1           5      6.434914           0.0      1.878855      1.286983
3DOk4           5     -3.223352           0.0      1.878855     -0.644670
3DOk5           5      1.602038           0.0      1.878855      0.320408
3DOk7           5     -0.827699           0.0      1.878855     -0.165540
3DOk13          5     -3.985901           0.0      1.878855     -0.797180
                   Average scores were used for ties.

 Savage One-Way Analysis
Chi-Square         16.0760
DF                       4
Pr > Chi-Square     0.0029


     Kolmogorov-Smirnov Test for Variable percent
           Classified by Variable treatment
                         EDF at    Deviation from Mean
treatment       N       Maximum        at Maximum
------------------------------------------------------
3DOk1           5         0.000         -0.804984
3DOk4           5         0.800          0.983870
3DOk5           5         0.000         -0.804984
3DOk7           5         0.000         -0.804984
3DOk13          5         1.000          1.431084
Total          25         0.360   

     Maximum Deviation Occurred at Observation 6
          Value of percent at Maximum = 17.0

Kolmogorov-Smirnov Statistics (Asymptotic)
KS  0.445421    KSa  2.227106

Cramer-von Mises Test for Variable percent
     Classified by Variable treatment

                           Summed Deviation
treatment          N           from Mean
-------------------------------------------
3DOk1              5            0.675840  
3DOk4              5            0.370240  
3DOk5              5            0.325440  
3DOk7              5            0.216640  
3DOk13             5            0.792640  

Cramer-von Mises Statistics (Asymptotic)
CM  0.095232    CMa  2.380800





Last modified
by James P. Geaghan
on Wednesday, August 14, 2003