+ Reply to Thread
Results 1 to 5 of 5

Iterating a matrix operation

Hybrid View

  1. #1
    Registered User
    Join Date
    04-04-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    17

    Iterating a matrix operation

    Hi All,

    I have an inverted matrix and want to calculate partial correlations using the formula Pij = - Pij/sqrt(Pii*Pjj) where Pij is the elment in the i-th row and j-column of the inverted correlation matrix.

    Can anyone tell me how to implement this formula into excel?

    Thanks in advance



    Attachment 162241
    Attached Files Attached Files

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Iterating a matrix operation

          A- B- C- D --E-- ---F--- ---G--- ---H---
      1              i \ j       1       2       3
      2   10 20 30       1 -1.0000 -0.8944 -1.0000
      3   40 50 60       2 -1.7889 -1.0000 -0.8944
      4   70 80 90       3 -2.3333 -1.1926 -1.0000
    The formula in F2 and copied right and down is

    =-A2/SQRT(INDEX($A$2:$C$4, $E2, $E2) * INDEX($A$2:$C$4, F$1, F$1))
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    04-04-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Iterating a matrix operation

    is there a way to do this without inserting E indices? I'm guessing I am getting no output due to that.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Iterating a matrix operation

          a- b- c- d ---e--- ---f--- ---g---
      1   10 20 30   -1.0000 -0.8944 -1.0000
      2   40 50 60   -1.7889 -1.0000 -0.8944
      3   70 80 90   -2.3333 -1.1926 -1.0000
    e1:

    =-a1 / sqrt(index($a$1:$c$3, columns($e1:e1), columns($e1:e1)) * index($a$1:$c$3, rows(e$1:e1), rows(e$1:e1)))

  5. #5
    Registered User
    Join Date
    04-04-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Iterating a matrix operation

    Thanks! This looks more tangible and it works!

+ 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