- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
how can I get the 95% confidence interval for the difference between two medians?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The NPAR1WAY procedure uses nonparametric tests to compare independent distributions. You can use the WILCOXON option to test for difference in location and use the MEDIAN option to requests the median test for difference. An example is provided in the documentation of PROC NPAR1WAY.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
yes, but it does not provide the 95% confidence interval for the difference between the two medians. do you know how to get that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Are you looking for Hodges-Lehmann Estimation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
No, that is for paired. My scenario is for unpaired.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Isn't odd to use the 95% CI for medians? Isn't the IQR or a different non parametric estimate used instead?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@msecic wrote:
No, that is for paired. My scenario is for unpaired.
Look again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
When I look at this output, am I to understand that the location shift represents the median difference?
Can someone comment on the relative merit of the Hodges-Lehmann approach vs bootstrapping. I was advised to use bootstrapping. is there a coding model I could use?
Many thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
It would take many pages to provide a complete answer to your question. Briefly,
- The H-L estimate is robust to extreme values b/c it is based on robust statistics.
- The CI for H-L is computed based on the asymptotic distribution of the H-L statistic under the null hypothesis (no difference between group locations)
- The bootstrap estimate is based on assuming that the population is well-represented by the sample. If your sample is small, contains rounded values, or contains a disproportional number of unusual observations, it might not be representative.
- In particular, a bootstrap analysis that involves medians of rounded values can lead to situations where the bootstrap distribution is not a good appr... to the actual distribution of the statistic. In those cases, you might need to use the smooth bootstrap.
- The bootstrap process gives you the approximate distribution of the statistic for the sample sizes w/o using any asymptotics.
If you choose to pursue bootstrapping, the answer should be close to the H-L estimates, so you have some basis for deciding whether your bootstrap analysis is correct. As for coding, you can start by reading "The Essential Guide to Bootstrapping in SAS,"
Although your advisor said to use bootstrapping, I think this problem is actually a "permutation test" rather than a bootstrap problem. You can see the article "Resampling and permutation tests in SAS," which computes a permutation test for the mean-difference problem. If you have SAS/IML, you can replace each call to the MEAN function with a call to the MEDIAN function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This was very helpful thank you. I have also looked into using quantile regression. I have examined the dataset using HL, bootstrapping and quantile regression. The findings are essentially the same with each approach.