Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wilcoxon test for (in)equality of medians

    Hello everyone,
    For my univariate analyses I am running a number one-sample t-tests. However, I would also like to test the according medians agains the same value (here hypothesized to be 0). After having done some research, it seems that the Wilcoxon test is the way to go. However, I also came across the K-sample equality-of-medians test. What I do not understand however, is what to sort the K-sample median test by
    Does anyone happen to know which one is more appropriate here? Would it make sense to use the Wilcoxon test? My data is relatively normally distributed.
    Thanks a lot,
    Julia

  • #2
    Wilcoxon(-Mann-Whitney) tests are often loosely explained but they are not strictly about comparing medians, but more about whether one group of values is stochastically larger than other. For say X and Y my preference is to characterise them as estimating P(X > Y) over all pairs of values, one X and one Y. That point of view is more evident in the use of Somers' d.

    Your purposes would seem to call for confidence intervals for each group median and then your tests are immediately given by whether the intervals include zero.

    Roger Newson's somersd is highly versatile and might be of use to you.

    Code:
    search somersd
    for download locations.

    Comment


    • #3
      Julia:
      as an aside to Nick's (as always) helpful advice, you may want to wonder whether a series of univariate -ttest- is more informative that an unique linear regression model.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Dear Nick thank you for your answer.
        I am not sure if I entirely understand your advice.
        Are you advising me to use Sommers' d or confidence intervals? I am not sure what the exact differences are (stats newbie here). Would I be able to use them to compare whether the median is different from zero as well?
        And strictly speaking would be wrong to use the Wilcoxon test? I am just not sure whether I am grasping the subtle differences.

        Thanks a lot, I appreciate your help.

        Comment


        • #5
          Dear Carlo,
          In addition to the univariate tests I described above, I am also running a number of multivariate regressions.

          Thank you for your help,
          Julia

          Comment


          • #6
            Somers' d is geared towards confidence intervals. To rephrase my advice:

            1. Generally, confidence intervals for the median are feasible and provide indirectly a test of your hypothesis.

            2. Specifically, Somers' d could help here too, as its machinery extends beyond two-group comparisons.

            I don't see that you can use WIlcoxon without two groups,. and if not doesn't the question end there?

            Comment


            • #7
              Julia:
              unles you have =>2 dependent variables, a pedantic teacher would point out that you are in fact running multiple (and not multivariate) regression models.
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment


              • #8
                Criss-crossing posts here as so often, but just to underline with Carlo Lazzaro that it's unlikely that you need lots of little univariate tests if the main analysis is a regression model.

                Comment

                Working...
                X