+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 22

Thread: Comparing two groups - best test to use?

  1. #1

    Comparing two groups - best test to use?




    Hi all,

    I have two sets of data - hospital admission lengths (measured in whole hours) grouped in to 'younger patients' and 'older patients'. There are over 100 individuals/entries in each group and each group is independent. Both sets of data are skewed, neither exhibiting a normal distribution (on histogram). Medians (which differ between groups) are a better measure than mean (I have outliers that need to be kept). I want to ascertain whether there is a difference in length of stay between the two groups.

    My issues:
    1. How do I formally ascertain the shape of each group to know whether a Mann Whitney U test is appropriate? If it is, would it be sensible to use in view of my outliers?
    2. If shape is not similar, which test is the best to use to compare the two groups?


    Thanks for your help!
    AbnormallyDistributed (Excel user)
    Last edited by AbnormallyDistributed; 08-29-2016 at 10:59 AM.

  2. #2
    TS Contributor
    Points: 40,621, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Downloads
    gianmarco's Avatar
    Location
    Italy
    Posts
    1,368
    Thanks
    232
    Thanked 301 Times in 225 Posts

    Re: Comparing two groups - best test to use?

    I would use MW test.
    As for your concerns, please read my comments about MW test in this earlier (recent) discussion: LINK
    http://cainarchaeology.weebly.com/

  3. The Following User Says Thank You to gianmarco For This Useful Post:

    AbnormallyDistributed (08-29-2016)

  4. #3
    Human
    Points: 12,676, Level: 73
    Level completed: 57%, Points required for next Level: 174
    Awards:
    Master Tagger
    GretaGarbo's Avatar
    Posts
    1,362
    Thanks
    455
    Thanked 462 Times in 402 Posts

    Re: Comparing two groups - best test to use?

    Quote Originally Posted by gianmarco View Post
    I would use MW test.
    I would not!

    Quote Originally Posted by gianmarco View Post
    As for your concerns, please read my comments about MW test in this earlier (recent) discussion: LINK
    Of course I don't agree about what Gianmarco [who is a great person] is saying there. In that link the question is different. Maybe I will write a reply when my fever is gone.

  5. The Following User Says Thank You to GretaGarbo For This Useful Post:

    AbnormallyDistributed (08-29-2016)

  6. #4
    TS Contributor
    Points: 40,621, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Downloads
    gianmarco's Avatar
    Location
    Italy
    Posts
    1,368
    Thanks
    232
    Thanked 301 Times in 225 Posts

    Re: Comparing two groups - best test to use?

    @Greta: the question is different; still, the ways in which MW test can be conceived hold true for this new question as well.
    As far as the OP is Happy to test whether the values in one group tend to be larger than the values of the other group, I believe he can actually use MW (which allows to get some other useful measures of effect size as well, as described in that earlier post).

    (You're a great and helpful person too)
    http://cainarchaeology.weebly.com/

  7. The Following User Says Thank You to gianmarco For This Useful Post:

    AbnormallyDistributed (08-29-2016)

  8. #5
    Points: 66, Level: 1
    Level completed: 32%, Points required for next Level: 34

    Posts
    5
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Re: Comparing two groups - best test to use?

    Thanks both for your replies

    GretaGarbo - what are your reservations?

    AD

  9. #6
    TS Contributor
    Points: 17,779, Level: 84
    Level completed: 86%, Points required for next Level: 71
    Karabiner's Avatar
    Location
    FC Schalke 04, Germany
    Posts
    2,542
    Thanks
    56
    Thanked 640 Times in 602 Posts

    Re: Comparing two groups - best test to use?

    If you actually think that the median is the best measure
    of central tendency here, und you want to compare groups
    in this respect, then the median test could be used. The
    test is less powerful than t-test or U-test, but with n=200
    power should still be large enough here. The interpretation
    of results would be straightforward, in contrast to Mann-
    Whitney.

    With kind regards

    Karabiner

  10. The Following 2 Users Say Thank You to Karabiner For This Useful Post:

    AbnormallyDistributed (08-29-2016), GretaGarbo (08-29-2016)

  11. #7
    Human
    Points: 12,676, Level: 73
    Level completed: 57%, Points required for next Level: 174
    Awards:
    Master Tagger
    GretaGarbo's Avatar
    Posts
    1,362
    Thanks
    455
    Thanked 462 Times in 402 Posts

    Re: Comparing two groups - best test to use?

    Quote Originally Posted by gianmarco View Post
    As far as the OP is Happy to test whether the values in one group tend to be larger than the values of the other group, I believe he can actually use MW
    @Gianmarco,
    Maybe the OP is happy with the model, but would you be happy with that? The model says that the average or median hospital admission lengths suddenly jumps up to a higher level as the person passes the break point of going from "young" to "old". That is what the model says. Is that really reasonable?

    Isn't it more natural to think of age as an independent variable in a regression model, possibly with squared terms? Or to model Age with a generalized additive model (gam) so that the age effect can be gradually smoothed with local splines (and the OP can get a nice diagram)?

    And I want to thank Karabiner. I was not aware or the median test. (It seems to be about using a chi-squared test. That sounds kind of familiar. )

  12. The Following User Says Thank You to GretaGarbo For This Useful Post:

    AbnormallyDistributed (08-29-2016)

  13. #8
    TS Contributor
    Points: 40,621, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Downloads
    gianmarco's Avatar
    Location
    Italy
    Posts
    1,368
    Thanks
    232
    Thanked 301 Times in 225 Posts

    Re: Comparing two groups - best test to use?

    Quote Originally Posted by Karabiner View Post
    The interpretation
    of results would be straightforward, in contrast to Mann-
    Whitney.
    What's wrong with the interpretation of MW?
    http://cainarchaeology.weebly.com/

  14. The Following User Says Thank You to gianmarco For This Useful Post:

    AbnormallyDistributed (08-29-2016)

  15. #9
    TS Contributor
    Points: 40,621, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Downloads
    gianmarco's Avatar
    Location
    Italy
    Posts
    1,368
    Thanks
    232
    Thanked 301 Times in 225 Posts

    Re: Comparing two groups - best test to use?

    Quote Originally Posted by AbnormallyDistributed View Post
    I want to ascertain whether there is a difference in length of stay between the two groups.
    That research question is perfectly fit to MW test, again in its 'broad' interpretation: i.e., is there a tendency for hospital admission lenght of younger people to score higher than the hospital admission lenght of older people?

    As for the median test:
    Should the Median Test be Retired from General Use?
    "Although several authors have indicated that the median test has low power in small samples, it continues to be presented in many statistical textbooks, included in a number of popular statistical software packages, and used in a variety of application areas. We present results of a power simulation study that shows that the median test has noticeably lower power, even for the double exponential distribution for which it is asymptotically most powerful, than other readily available rank tests. We suggest that the median test be "retired" from routine use and recommend alternative rank tests that have superior power over a relatively large family of symmetric distributions."

    Boris Freidlin and Joseph L. Gastwirth
    The American Statistician Vol. 54, No. 3 (Aug., 2000), pp. 161-164
    http://www.jstor.org/stable/2685584
    http://cainarchaeology.weebly.com/

  16. The Following 2 Users Say Thank You to gianmarco For This Useful Post:

    AbnormallyDistributed (08-29-2016), GretaGarbo (08-29-2016)

  17. #10
    Human
    Points: 12,676, Level: 73
    Level completed: 57%, Points required for next Level: 174
    Awards:
    Master Tagger
    GretaGarbo's Avatar
    Posts
    1,362
    Thanks
    455
    Thanked 462 Times in 402 Posts

    Re: Comparing two groups - best test to use?

    Quote Originally Posted by gianmarco View Post
    That research question is perfectly fit to MW test, again in its 'broad' interpretation: i.e., is there a tendency for hospital admission lenght of younger people to score higher than the hospital admission lenght of older people?
    Yes, the OP is happy with that, but are you happy with that, Gianmarco?

  18. The Following User Says Thank You to GretaGarbo For This Useful Post:

    AbnormallyDistributed (08-29-2016)

  19. #11
    TS Contributor
    Points: 40,621, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Downloads
    gianmarco's Avatar
    Location
    Italy
    Posts
    1,368
    Thanks
    232
    Thanked 301 Times in 225 Posts

    Re: Comparing two groups - best test to use?

    I am always happy :-)
    http://cainarchaeology.weebly.com/

  20. The Following 2 Users Say Thank You to gianmarco For This Useful Post:

    AbnormallyDistributed (08-29-2016), GretaGarbo (08-29-2016)

  21. #12
    Points: 66, Level: 1
    Level completed: 32%, Points required for next Level: 34

    Posts
    5
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Re: Comparing two groups - best test to use?

    Hi all,

    Lots of discussion! Thank you.

    Greta - what would you suggest as an alternative? At this stage I'm happy with an outcome that comments on the difference between the two groups as they are. Basic analysis is ok for my current purpose.

    Karabiner (or others) - how can I run a median test? Excel doesn't seem to have a way. Any online calculators you can suggest? I've tried one but have no way of knowing if it's reliable (http://www.fon.hum.uva.nl/Service/St...dian_Test.html) - I have A 156, B 111, Median 12, p= .0614 (median of group A is 11 (range 4-360), median of group B is 21 (range 5-224)). Unfortunately I don't currently have access to any other statistical software.

    GianMarco - I've run the Mann Whitney and included those results ((U = 7505, Z = -1.85, p = .06). Thanks.

    Thanks again,

    AD

  22. #13
    TS Contributor
    Points: 17,779, Level: 84
    Level completed: 86%, Points required for next Level: 71
    Karabiner's Avatar
    Location
    FC Schalke 04, Germany
    Posts
    2,542
    Thanks
    56
    Thanked 640 Times in 602 Posts

    Re: Comparing two groups - best test to use?

    Quote Originally Posted by gianmarco View Post
    What's wrong with the interpretation of MW?
    Nothing is wrong, generally speaking. But I was referring to the idea that the OP was interested in comparing medians. M-W (or Wilcoxon rank sum test) does not compare medians.

    With kind regards

    K.

  23. The Following 2 Users Say Thank You to Karabiner For This Useful Post:

    AbnormallyDistributed (08-29-2016), GretaGarbo (08-29-2016)

  24. #14
    TS Contributor
    Points: 40,621, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Downloads
    gianmarco's Avatar
    Location
    Italy
    Posts
    1,368
    Thanks
    232
    Thanked 301 Times in 225 Posts

    Re: Comparing two groups - best test to use?

    An even simpler approach would be plotting two notched boxplots (there should be an online facility somewhere in the web), and see if the notches overlap. If they DO NOT overlap, there is a significant difference in median (provided that you want to stick with focusing in the medians).
    You may want to refer to this article (as for notched boxplot):
    Points of Significance: Visualizing samples with box plots

    Cheers

    EDIT:
    boxplot online facility: http://boxplot.tyerslab.com/
    http://cainarchaeology.weebly.com/

  25. The Following 2 Users Say Thank You to gianmarco For This Useful Post:

    AbnormallyDistributed (08-29-2016), GretaGarbo (09-02-2016)

  26. #15
    Points: 66, Level: 1
    Level completed: 32%, Points required for next Level: 34

    Posts
    5
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Re: Comparing two groups - best test to use?


    Thanks for that.

    Median test and MW both had p values >.05. The notched box plot (different website to the one you suggested: http://wessa.net/rwasp_notchedbox1.wasp) shows no overlap. What are the possible explanations for the differences in results?

    AD

+ Reply to Thread
Page 1 of 2 1 2 LastLast

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats