+ Reply to Thread
Results 1 to 5 of 5

multiple correlations - help!

  1. #1
    Registered User
    Join Date
    10-22-2012
    Location
    london england
    MS-Off Ver
    Excel 2010
    Posts
    4

    multiple correlations - help!

    Hi guys!

    I was wondering if you can help me - i am a bit of an excel novice, but am trying to learn...

    I have a very long bivariate series. say, for example, 1....500000, in columns a and b.

    I then want to analyze the series into blocks of 100. I want to look at correlations for each 100 pairwise observations. So, then, in cell d1, for example I want to calculate the correlation between the two series (a and b - simply correl(a1:a100,b1:b100)) for the first 100 pairs.Then, in cell e1, for example I want to calculate the correlation between the second hundred pairs, from (101,...,200 - which is obviously correl(a101:a200,b101:b200)).

    Is there an easy way to do this without typing out each correlation formula - i.e. - add 100 to each argument as you copy across horizontally? Is this a VBA thing?

    Many thanks for your help!

  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: multiple correlations - help!

    In C1 and copy down,

    =CORREL(
    INDEX(A:A, 100*(ROW()-ROW(C$1))+1):INDEX(A:A, 100*(ROW()-ROW(C$1))+100),
    INDEX(B:B, 100*(ROW()-ROW(C$1))+1):INDEX(B:B, 100*(ROW()-ROW(C$1))+100))
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    10-22-2012
    Location
    london england
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: multiple correlations - help!

    i am forever in your debt. thank you so much.

  4. #4
    Registered User
    Join Date
    10-22-2012
    Location
    london england
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: multiple correlations - help!

    Apologies! I have just one further question - If i want to amend this for another correlation coefficeint - say - where you have C1 as your 'contemporaneous' correlation coefficient - and I would like the value in D1 to be a 'lagged' correlation coefficient - say, correl(A2:100,b1:b99), with the correlation to go into cell D1, how would I do this, again in a format which I could drag down? Trying to figure it out on my own but it is difficult as a novice!

  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: multiple correlations - help!

    =correl(
    index(a:a, 100*(row()-row(c$1))+2):index(a:a, 100*(row()-row(c$1))+101),
    index(b:b, 100*(row()-row(d$1))+1):index(b:b, 100*(row()-row(d$1))+100))

+ 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