29
$\begingroup$

My problem: parallel group randomized trial having a very right-skewed distribution of the primary outcome. I do not want to assume normality and use normal-based 95% CIs (i.e. using 1.96 X SE).

I am comfortable expressing the measure of central tendency as the median, but my question is then how to construct a 95% CI of the difference in medians between the two groups.

The first thing that comes to mind is bootstrapping (resample with replacement, determine median in each the two groups and subtract one from the other, repeat 1000 times, and use the Bias-corrected 95% CI). Is this the correct approach? Any other suggestions?

$\endgroup$
5
  • 3
    $\begingroup$ That was the first thing that came to my mind too. How big a sample do you have? $\endgroup$
    – jbowman
    Commented Apr 24, 2012 at 16:01
  • $\begingroup$ 40 people in each of two groups = 80 total. $\endgroup$
    – pmgjones
    Commented Apr 24, 2012 at 17:21
  • 3
    $\begingroup$ You might look into the nonparametric confidence interval and estimator for the difference of location parameters based on the Hodges-Lehmann estimator. As explained in the help page for R's wilcox.test() (under Details), this is closely related to the difference in medians, but not quite the same. $\endgroup$
    – caracal
    Commented Apr 24, 2012 at 17:36
  • 2
    $\begingroup$ With regards to bootstrapping the median, it might be worthwhile to read about the smoothed bootstrap. $\endgroup$
    – caracal
    Commented Apr 24, 2012 at 17:47
  • $\begingroup$ @caracal : This is a good point. Both the usual or smoothed bootstrap have correct asymptotic coverage, but the coverage probability of the smoothed bootstrap converges at a slightly faster rate. If I recall correctly, $|P(m \in \hat{I}_n) - 0.95| = O(n^{-1/3})$ for the usual bootstrap, and $O(n^{-2/5})$ for the smoothed bootstrap. There is a brief discussion of this with further references in Quantile Regression by Koenker (2005). $\endgroup$
    – paul
    Commented Apr 25, 2012 at 19:05

2 Answers 2

11
$\begingroup$

The bootstrap procedure that you describe should be valid. However, it's important to keep in mind that, like normal-based 95% CI, a bootstrap confidence interval is only guaranteed to have correct coverage asymptotically. One nice thing about working with the median or other quantiles is that you can construct exact finite sample confidence intervals under very weak assumptions. The basic idea is that under the null that median of $y$ is $m$, the indicator for $y < m$ is a Bernoulli 0.5 random variable. You can use this observation to create a test statistic with a known finite sample distribution. See Chernozhukov, Hansen, Jansson (2009) for more details.

$\endgroup$
2
  • 1
    $\begingroup$ Could you please explain what you mean that it is only valid asymptotically? I'm specifically unsure what asymptotically means in this context. Thanks! $\endgroup$
    – pmgjones
    Commented Apr 24, 2012 at 23:52
  • $\begingroup$ @pmgjones: A 95% confidence interval, $\hat{I}_n$, for some parameter $m$ is such that $P(m \in \hat{I}_n) = 0.95$ for all possible $m$ (or really all possible data generating processes). I wrote $\hat{I}_n$ to emphasize that the interval is some function of your sample. For the bootstrap or normal-based confidence interval, it is not true that $P(m \in \hat{I}_n) = 0.95$ (except for very special data generating processes). However, you can show that $\lim_{n \to \infty} P(m \in \hat{I}_n) = 0.95$. This is what I meant by saying that the bootstrap is only valid asymptotically. $\endgroup$
    – paul
    Commented Apr 25, 2012 at 18:52
5
$\begingroup$

You can also try the method suggested in http://www.ncbi.nlm.nih.gov/pubmed/12243307 (Bonett, Price; 2002) as a simpler (at least computationally, I think) alternative. Good question, by the way.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.