Showing posts with label Wilcoxon. Show all posts
Showing posts with label Wilcoxon. Show all posts

11.10.07

Wilcoxon Signed Rank test

Compiled by Sreedevi Menon

As part of the efficacy analysis of a recent Phase III study , it was planned to determine the significant difference in efficacy of treatments over the weeks. Each treatment group was analyzed separately. The paired t-test was employed to carry out the analysis on the parametric data.The Wilcoxon Signed Rank test was used for analysis of efficacy of treatments with respect to non-parametric data. The null hypothesis was that in the underlying population of differences among pairs the median difference is equal to 0. The alternate hypothesis may be one sided or two sided.

In SAS, this test is performed using the proc univariate procedure. Before applying the procedure, the difference between the value of parameter at the two time points that are to be compared (usually pre and post dose values) has to be computed. This difference is then defined in the “var” statement of the procedure. The syntax is as followed

ods output BasicMeasures= _A TestsforLocation= _B
proc univariate data= eff_data;
var diff;
run;
ods output close;

The output will contain p-value corresponding to Student’s t, Sign and Signed Rank tests. The p-value corresponding to the signed rank test will be considered. Further, For a 1-sided p-value, we would divide the 2-sided p-value by 2.The ‘ods output statement’ is used to extract descriptive statistics and the p value to two different datasets by using the as shown in the above example

2.7.07

Wilcoxon rank-sum test

The Wilcoxon rank-sum test is a non-parametric analog of the two-sample t-test. It is based on ranks of the data, and is used to compare location parameters, such as the mean or median, between two independent populations without the assumption of normally distributed data.


DATA RNKSM;
INPUT TRT $ PAT SCORE @@;
DATALINES;
SER 2 0 SER 3 2 SER 5 3 SER 6 3
SER 8 -2 SER 10 1 SER 12 3 SER 14 3
SER 16 -1 SER 17 2 SER 20 -3 SER 21 3
SER 22 3 SER 24 0 SER 26 2 SER 27 -1
PBO 1 3 PBO 4 -1 PBO 7 2 PBO 9 3
PBO 11 -2 PBO 13 1 PBO 15 0 PBO 18 -1
PBO 19 -3 PBO 23 -2 PBO 25 1 PBO 28 0
;

PROC NPAR1WAY WILCOXON DATA = RNKSM;
CLASS TRT; VAR SCORE;
TITLE1 'The Wilcoxon Rank-Sum Test';
RUN;