Announcement

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

  • Equality of medians

    ttest allows calculation of equality of means for more than one variables. Is there any similar package available for testing equality of medians as the existing packages (like ranksum, median etc.) allow testing one variable at a time.
    PS: Understandably ranksum is not an ideal choice for testing equality of medians.

  • #2
    I'm not sure I understand you. ttest is for one or two sample means. With more means you need anova or regress. For nonparametric tests, look to ranskum or kwallis.

    If multivariate, look to hotelling, mvtest, or (ssc) umbrella.

    Comment


    • #3
      You could use ranksum or median commands to test the equality of medians in the same way as ttest is applied to equality of means.

      Comment


      • #4
        I referred to the "two sample ttest using groups" which can be done for a group of variables. My question is whether we can do this for median or not.

        Comment


        • #5
          T test is parametric test that test the equality of two means for the two groups. The non-parametric counterpart of t test is Mann Whitney two sample test for the equality of medians for the two groups. The example would be testing whether the median salary of male doctors is equal to median salary of female doctors.

          Stata command ranksum runs this test. Details about ranksum command in stata can be found in help.

          Comment


          • #6
            When performing the Wilcoxon ranksum test. I believe we can claim we are checking the "equality of medians" assumption only if the distribution of both variables present a similar shape and variance, otherwise we'd have, basically, "difference" - or not - in the sum of ranks.
            Best regards,

            Marcos

            Comment


            • #7
              Zaheer:
              you may want to consider -qreg-, too.
              ​​​​​​
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment


              • #8
                Thanks Marcos and Carlo. qreg is precisely the solution.

                Comment

                Working...
                X