+ Reply to Thread
Results 1 to 3 of 3

"visualizing" Post hoc pairwise comparisons

  1. #1
    Registered User
    Join Date
    03-02-2006
    Posts
    17

    "visualizing" Post hoc pairwise comparisons

    I have a problem that I think is more of a "logic" problem than a VBA problem, but I need to solve it in VBA in Excel.

    I have written a macro that calculates a Kruskal-Wallis nonparametric test. If this test is significant, it runs nonparametric post hoc pairwise comparisons to see which groups are significantly different. This all works without a hitch.

    However, I am having trouble outputting the results. I create a matrix of all comparisons, and if the comparison is significant it marks that pair with an asterisk. I wish to modify that so it shows the results like you would get from a statistical package like SAS or SPSS. That is, I want all groups that are not significantly different to have the same letter.

    For example, say I'm comparing the height of 4 different corn hybrids. The K-W test says that there is a significant difference between the groups, but I must run the post hoc test to see if groups 1 & 2 are different, 1 & 3 are different, 1 & 4 are different, 2 & 3 are different, 2 & 4 are different, and / or 3 & 4 are different.

    Say my results come out like this: 1 is significantly different from all other groups, 2 is different from 1 & 4, 3 is different from 1, and 4 is different from 1 & 2. Thus, my groupings look like this:

    1 A
    2 B
    3 B, C
    4 C

    See how the letter groupings show significance? And, see how the groups can overlap, so that although 2 is different from 4 and no different from 3, 3 is no different from 4? See how this can make me insane?

    So, the question is, how can I come up with a logical method for assigning the letters? Right now, I do it by hand, and I usually get it right by just looking at the groups, but I know that there must be a logical way (because the stat software does it). Doing it by hand gets really tough with more groups and more overlap. Plus, I want a logical way of organizing these comparisons that I can show my students. Any ideas?

  2. #2
    Registered User
    Join Date
    04-25-2013
    Location
    Texcoco, Mexico
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: "visualizing" Post hoc pairwise comparisons

    I have the same problem. I have 16 pairwise comparisons to make, on 8 different figures. Any solutions to this?

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: "visualizing" Post hoc pairwise comparisons

    The Dirt Dude,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1