+ Reply to Thread
Results 1 to 2 of 2

statistical problem: building orthogonal contrasts in excel ( pairwise mean comparison)

  1. #1
    Registered User
    Join Date
    10-23-2012
    Location
    Tehran, Iran
    MS-Off Ver
    Excel 2007
    Posts
    6

    statistical problem: building orthogonal contrasts in excel ( pairwise mean comparison)

    Hi all;

    A way to pairwise comparing of mean of several groups can be orthogonal comparisons. to do this we need to define a set of contrast coefficients to accomplish mean comparisons. consider we have 2 groups for compare. the orthogonal coefficients will be as below:

    all possible pairwise groups c1 c2

    ---------------------------------------------
    group 1 vs group 2 +1 -1

    this is a 1*2 matrix(consider that c1+c2=0)

    this tells us that mean of group 1 statistically is comparing with the mean of group 2. in the case of 3 groups we seezero means that the related group not involved in mean comparison)


    all possible pairwise groups c1 c2 c3
    group 1 vs group 2 1 -1 0
    group 1 vs group 3 1 0 -1
    group 2 vs group 3 0 1 -1

    again ( c1+c2+c3=0) and we have a 3*3 matrix

    comparing 4 groups:

    all possible pairwise groups c1 c2 c3 c4
    group 1 vs group 2 1 -1 0 0
    group 1 vs group 3 1 0 -1 0
    group 1 vs group 4 0 1 0 -1
    group 2 vs group 3 0 1 -1 0
    group 2 vs group 4 0 1 0 -1
    group 3 vs group 4 0 0 1 -1
    we have a 6*4 matrix

    For the case of N groups the matrix dimension is: (N*(N-1)/2) rows and N collumns.

    as the groups increased the dimension of matrix of pairwise coefficients are rises. writing a set of these coefficients seems to be very boring for 150 or 200 groups.
    The question is: Is a macro available to build these coefficients for comparing N groups ?

    I will be appreciated beforehand for your helps or hints

    Cheers.....
    Ramin
    Attached Files Attached Files
    Last edited by rmrf; 01-08-2016 at 08:00 AM. Reason: to add an attachment

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: statistical problem: building orthogonal contrasts in excel ( pairwise mean comparison

    Macro code.
    A4 is set as starting cell, can be changed
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Building a selection tool - problem with the range
    By japie123 in forum Excel General
    Replies: 5
    Last Post: 09-09-2014, 10:39 AM
  2. Building a Comparison tool... possible?
    By txguyg in forum Excel General
    Replies: 10
    Last Post: 12-20-2013, 06:57 AM
  3. Replies: 1
    Last Post: 11-26-2013, 11:55 AM
  4. Macro for calculating pairwise rolling correlations
    By TrueTears in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-10-2013, 06:53 AM
  5. Problem with Statistical UDFs
    By pablocampbell in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-13-2005, 09:10 AM
  6. problem about building a listbox from another list
    By liangxin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-24-2005, 09:28 PM
  7. Statistical problem
    By kalas123 in forum Excel General
    Replies: 2
    Last Post: 05-07-2005, 11:26 AM

Tags for this Thread

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