+ Reply to Thread
Results 1 to 7 of 7

Correlation matrix between two data sets

  1. #1
    Forum Contributor
    Join Date
    04-24-2012
    Location
    Moscow
    MS-Off Ver
    Excel 2010
    Posts
    291

    Correlation matrix between two data sets

    Hi all, please help,

    Lets say we have two data sets: 1st consists of 100 variables arranged into 100 columns and 2nd one is 200 other variables arranged into 200 columns. We need to calculate correlations of each of 100 variables with every one out of 2nd 200 variables. All variables for the same sample of 50 dates - so per every date we have 100+200=300 variables.So no need in correlations inside the groups, only cross correlations.At the output must be 100*200=20000 correlations. Is it possible some how just to write formula using correl and just drag it?? Any other way will be welcome. Is there any elegant and efficient way of doing it, say, in 1 min??? THANKS IN ADVANCE
    Last edited by Alexander_Golinsky; 04-24-2012 at 05:25 PM.

  2. #2
    Forum Contributor
    Join Date
    08-11-2004
    Posts
    109

    Re: Correlation matrix between two data sets

    Post a small example.

  3. #3
    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: Correlation matrix between two data sets

    What are the ranges of each of the datasets?
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Contributor
    Join Date
    04-24-2012
    Location
    Moscow
    MS-Off Ver
    Excel 2010
    Posts
    291

    Re: Correlation matrix between two data sets

    Date GTITL1 GTITL2 … GRITL100 Date GTESP1 GTESP2 … GRESP200
    1/1/2012 0.149615161 0.374572629 … 0.348408936 1/1/2012 0.272902818 0.708433572 … 0.739978709
    1/2/2012 0.675777933 0.049600082 … 0.533729676 1/2/2012 0.026408486 0.748448889 … 0.050795401
    1/3/2012 0.406733691 0.49848047 … 0.225104348 1/3/2012 0.591292552 0.971468783 … 0.907372495
    … … … … … … … … … …
    2/19/2012 0.739873688 0.779420615 … 0.578924276 2/19/2012 0.315167013 0.603699503 … 0.992832486

  5. #5
    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: Correlation matrix between two data sets

    Please Login or Register  to view this content.
    The formula in P2 and copied right and down is

    =CORREL(INDEX(DataA, 0, P$1), INDEX(DataB, 0, $O2))

  6. #6
    Forum Contributor
    Join Date
    04-24-2012
    Location
    Moscow
    MS-Off Ver
    Excel 2010
    Posts
    291

    Re: Correlation matrix between two data sets

    I knew you're true Guru!!! Thank you very much!! You saved me a lot of time )

  7. #7
    Forum Contributor
    Join Date
    04-24-2012
    Location
    Moscow
    MS-Off Ver
    Excel 2010
    Posts
    291

    Re: Correlation matrix between two data sets

    Now the other question. What if two data sets are for the same period but number of days and days themselves differ for different data sets. This formula wont work then. How one can solve this?

+ 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