'Life is after all a recursive summation, indeed     Let's do some Statistics!

Department of Civil and Environmental Engineering
Frank Batten College of Engineering and Technology
Old Dominion University
Norfolk, Virginia 23529-0241, USA
Tel) (757) 683-3753
Fax) (757) 683-5354


	
Return to CEE 700/800 Homepage
CEE 700/800 Access Counter
 
Go back to
SAS Source Page
Nonparametric Sign & Wilcoxon's Sign-Rank Test Examples for C.T.
SAS Source: NONP_SIGN.SAS

Description

Without testing normality, you can directly use nonparametric Sign test or Wilcoxon's Sign-Rank test to test your hypothesis on suspected C.T on a sample. Since these tests are nonparametric in their nature, the C.T. represents the median of the sample. Major difference between these two tests is that the Wilcoxon's Sign-Rank test assumes the sample observations were from a symmetric continuous distribution regardless of its shape (i.e., such as symmetric multi-modal distribution).

You can evaluate your T.H. using p-values from both Sign and Sign-Rank tests against alpha, and determine whether HMSUB>0 is to be rejected. (p-value is for two-way by default. For one-way T.H., divide p-value by 2)

For comparing paired-sample C.T. nonparametricaly, use Wilcoxon's Rank Sum procedure)

SAS Listing


OPTIONS LINESIZE=72;
TITLE1 'Nonparametric Sign & Wilcoxon Sign-Rank test for C.T.';
TITLE2 '** UNIVARIATE PROCEDURE **';

/* Name the data set, let's use Chemical Hydro-    */
/* carbon or 'ChemHC' - the data set represent     */
/* a relationship between the purity of oxygen     */
/* produced in a chemical distillation process     */
/* and the percentage of hydrocarbon that are      */
/* presented in the main condenser of the          */
/* distillation unit.                              */

/* Data set name could be anything you want, Max.  */
/* 8 characters, and it is case-insensitive        */
DATA ChemHC;

/* Define the order of data variables to be read   */
/* in the data set -- 'Purity' first, then         */
/* 'H_Carbon' and repeat till the data set exhaust */
/* @@ means a loop in reading input variable sequence */
INPUT Purity H_Carbon @@;
CARDS;
90.01 0.99   89.05 1.02   91.43 1.15
93.74 1.29   96.73 1.46   94.45 1.36
87.59 0.87   91.77 1.23   99.42 1.55
93.65 1.40   93.54 1.19   92.52 1.15
90.56 0.98   89.54 1.01   89.85 1.11
90.39 1.20   93.25 1.26   93.41 1.32
94.98 1.43   87.33 0.95
;
RUN;

PROC UNIVARIATE LOCCOUNT MU0 = 90;
/* LOCCOUNT = Request a table that shows number of */
/*            observations greater than, equal to, */
/*            and less than MU0=                   */
/* MU0 = Specify the value of the mean or location */
/*            parameter. i.e., C.T. value that you */
/*            testing in the T.H. In this case, you*/
/*            testing whether C.T. (=median for    */
/*            nonparametric) is equal to 90 at 95%.*/

/* Designate a target variable for Descriptive     */
/* Statistics - in this case, the target variable  */
/* is Purity                                       */
  VAR Purity;
RUN;



SAS Listing

SAS User Guide (SUG) for Procedures (PROC) used in the Source

SUG UNIVARIATE procedure
Go back to
SAS Source Page

Return to CEE 700/800 Homepage Return to CEE 700/800 Homepage Move to the Top of this page