Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Re: difference between two medians - 95% CI

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 01-05-2017 07:57 AM
(7012 views)

how can I get the 95% confidence interval for the difference between two medians?

9 REPLIES 9

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- 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

- 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

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. **Registration is now open through August 30th**. Visit the SAS Hackathon homepage.

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.