Download presentation
Presentation is loading. Please wait.
Published byDoris Golden Modified over 9 years ago
1
Independent samples- Wilcoxon rank sum test
2
Example The main outcome measure in MS is the expanded disability status scale (EDSS) The main outcome measure in MS is the expanded disability status scale (EDSS) The EDSS is a 0-10 scale with steps of 0.5 The EDSS is a 0-10 scale with steps of 0.5 Ordinal scale Ordinal scale –Ordered, but magnitude between steps is uncertain Dr. Kurtzke who developed the scale believes the steps of scale are just a rank, not a measure of magnitude Dr. Kurtzke who developed the scale believes the steps of scale are just a rank, not a measure of magnitude –This makes a t-test inappropriate
3
Pediatric vs. adult Most MS patients develop the disease between age 20-40, but a subset of patients develop MS younger Most MS patients develop the disease between age 20-40, but a subset of patients develop MS younger What is different about these patients? What is different about these patients? If we investigated patients at similar disease duration, is there a significant difference in EDSS? If we investigated patients at similar disease duration, is there a significant difference in EDSS?
4
Since we have two independent samples, we could have used two-sample t-test Since we have two independent samples, we could have used two-sample t-test Unfortunately, there seem to be outliers in the adult group Unfortunately, there seem to be outliers in the adult group Also, we know that we have ordinal data so a t-test is not appropriate Also, we know that we have ordinal data so a t-test is not appropriate
5
Wilcoxon rank sum test Since we have two independent samples and the t-test is not appropriate, we need a nonparametric test. The test for two independent samples is Wilcoxon rank sum. Since we have two independent samples and the t-test is not appropriate, we need a nonparametric test. The test for two independent samples is Wilcoxon rank sum. Again, we are interested in the median rather than the mean. Again, we are interested in the median rather than the mean. The hypothesis test of interest is The hypothesis test of interest is –H 0 : median adult = median pediatric –H A : median adult != median pediatric
6
Wilcoxon rank sum Again, we use the rank of the data points, rather than the actual values. Again, we use the rank of the data points, rather than the actual values. An exact Wilcoxon rank sum test can be used, but we focus on the approximate An exact Wilcoxon rank sum test can be used, but we focus on the approximate PatientEDSSGroupRank 10P1 21.5P4.5 31.5P4.5 41P2.5 52A6 61A2.5 73A7
7
Approximate Wilcoxon test If the sample size is large enough (rule of thumb, n=20) an approximate Wilcoxon test based on the normal approximation can be used If the sample size is large enough (rule of thumb, n=20) an approximate Wilcoxon test based on the normal approximation can be used – W=sum of ranks in smaller group – W =expected sum of ranks in smaller group under null – W =standard deviation of sum of ranks in smaller group under null
8
T and T Under the null of no difference between the groups, this expression is the expected sum of ranks in the small group Under the null of no difference between the groups, this expression is the expected sum of ranks in the small group The standard deviation is given by this formula The standard deviation is given by this formula
9
Results From our results, From our results, –sum of the ranks in smaller group: W=1526 –expected value of sum of positive ranks: –Standard deviation of sum of positive ranks Our approximate test statistic is Our approximate test statistic is
10
Ties In this example, we have many ties In this example, we have many ties As with the Wilcoxon signed rank test, a correction for ties can be made to the variance (see Rosner or other text book) As with the Wilcoxon signed rank test, a correction for ties can be made to the variance (see Rosner or other text book) This correction is included in STATA and all other computer packages This correction is included in STATA and all other computer packages
11
Hypothesis test 1) H 0 : median difference=0 2) Continuous outcome from paired data 3) Wilcoxon signed rank test 4) Test statistic: z=0.91 5) p-value= 0.36 6) Since the p-value is more than 0.05, we fail to reject the null hypothesis 7) We conclude that the there is no significant difference in terms of EDSS in pediatric and adult MS patients
12
p-value z-statistic
13
Comments Wilcoxon rank sum test is becoming more prominent because computers allow this statistic to be calculated very quickly Wilcoxon rank sum test is becoming more prominent because computers allow this statistic to be calculated very quickly There is not a large loss of power in using a Wilcoxon rank sum test compared to a t- test even when the normality assumption holds. There is not a large loss of power in using a Wilcoxon rank sum test compared to a t- test even when the normality assumption holds. If normality does not hold or ordinal data, Wilcoxon test is better If normality does not hold or ordinal data, Wilcoxon test is better
14
Parametric tests-nonparametric equivalent Paired t-test – Wilcoxon signed rank Paired t-test – Wilcoxon signed rank Two sample t-test – Wilcoxon rank sum Two sample t-test – Wilcoxon rank sum ANOVA – Kruskal-Wallis test ANOVA – Kruskal-Wallis test –When you have two or more independent samples and the assumptions of ANOVA are not met, you can use the Kruskal-Wallis test. This is a rank based test.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.