# Thread: Writing R^2 strictly in terms of simple correlations among variables

1. ## Writing R^2 strictly in terms of simple correlations among variables

Say we have the following regression

I want to write the multiple for this regression strictly in terms of the simple correlations among , , and . In the past we have (I think) discussed how to do this in a more general setting using some matrix calculations. What I want to find is the solution in non-matrix form for the special case where we have 2 predictors.

The top of p. 2 in the following course notes (http://www2.hawaii.edu/~halina/603/603multreg.pdf) suggests that the answer is

But I am having some trouble verifying this algebraically. I wonder if one of you could help point me in the write direction for deriving this from scratch.

2. ## Re: Writing R^2 strictly in terms of simple correlations among variables

only the devil and you know why you want to do this FROM SCRATCH... but ok, here are my \$0.02.

so, the formula we're working with is that R-squared in matrix form can be expressed as:

where is the vector of correlations between the dependent variable Y and the predictors X1 and X2 and is the correlation matrix for predictors X1 and X2.

so the first step is finding the inverse of:

for which we will use the super-duper handy Wolfram Calculator which says that is:

so all that's left to do is just work the convenient matrix multiplication of:

and after a lot of arduous and tedious matrix multiplications that i will let you thoroughly enjoy, you end up with the desired result.

just for kicks and giggles, i plugged all of this into my Maple and i get the exact same formula that you posted (but with switched signs for some reason, so i guess i can multiply it times -1 to get exactly what you got). but i can see that Maple inverted with the opposite signs that Wolfram did, so that's probably where it came from.

enjoy!

3. ## The Following 2 Users Say Thank You to spunky For This Useful Post:

Jake (10-18-2014), kiton (11-14-2014)

4. ## Re: Writing R^2 strictly in terms of simple correlations among variables

You can simply use the fact that:

and

.

Substitute these two expressions into the following equation

.

Simplifying the expression above will yield the result you’re looking for.

5. ## The Following User Says Thank You to Dragan For This Useful Post:

Jake (10-18-2014)

6. ## Re: Writing R^2 strictly in terms of simple correlations among variables

Originally Posted by spunky
just for kicks and giggles, i plugged all of this into my Maple and i get the exact same formula that you posted
Maple will show the element-wise results of matrix multiplications? I've got to get Maple! I've been looking for a program that would do this. I have a Mathematica license through my school but as far as I can tell it won't do this (or at least I can't figure out how to get it to). I just looked and it seems that my school doesn't have a Maple license... know of any other software that will do this?

Originally Posted by Dragan
You can simply use the fact that...
Thanks Dragan, that is super useful. I did not know those expressions that you posted, but they certainly do make this a simple problem if you know them.

7. ## Re: Writing R^2 strictly in terms of simple correlations among variables

If you give a concrete example (this would work) you could probably ask how to do what you want at the mathematica stackexchange site: http://mathematica.stackexchange.com/

8. ## Re: Writing R^2 strictly in terms of simple correlations among variables

Originally Posted by Jake
Thanks Dragan, that is super useful. I did not know those expressions that you posted, but they certainly do make this a simple problem if you know them.
that is NOT fair! i assumed Jake wanted everything from scratch. had i known this, i would have simply posted that formula and not struggle with the element-wise matrix productsss!! all those formulas (and more nuggets of wisdom) are in Cohen's regression bible. seriously, after reading the first few chapters of that book you learn to respect the correlation matrix because of all the stuff you can get from it.

and yes, Maple *DOES* show you the element-wise product of the matrices. once again, a CANADIAN piece of software beats the more popular AMERICAN alternative (go Canada!!!!)

9. ## Re: Writing R^2 strictly in terms of simple correlations among variables

this is what Maple does for you. if you evaluate the last expression and multiply it times -1/-1 you'd get the same formula

10. ## Re: Writing R^2 strictly in terms of simple correlations among variables

Originally Posted by spunky
that is NOT fair! i assumed Jake wanted everything from scratch. had i known this, i would have simply posted that formula and not struggle with the element-wise matrix productsss!!
Well like I said, it's all very useful, but if I'm being nitpicky I don't really consider either method to be "from scratch" for my purposes, since the first method relies on knowing the matrix expression in the first place, which I don't know how to derive, and the second method relies on knowing those equations which I also don't know how to derive. I was thinking more along the lines of something that started with the fundamental definition of and worked up from there, but the suggestions given certainly do give some clues about what the full derivation would look like, basically by breaking it down to some smaller and more tractable problems that I'm pretty sure I could solve if I try for a bit.

11. ## Re: Writing R^2 strictly in terms of simple correlations among variables

Originally Posted by Jake
Well like I said, it's all very useful, but if I'm being nitpicky I don't really consider either method to be "from scratch" for my purposes, since the first method relies on knowing the matrix expression in the first place, which I don't know how to derive, and the second method relies on knowing those equations which I also don't know how to derive. I was thinking more along the lines of something that started with the fundamental definition of and worked up from there, but the suggestions given certainly do give some clues about what the full derivation would look like, basically by breaking it down to some smaller and more tractable problems that I'm pretty sure I could solve if I try for a bit.
i've just done this for you. you can check out where my formula (and Dragan's) come from on this blog entry of mine:

12. ## The Following User Says Thank You to spunky For This Useful Post:

Jake (02-08-2015)

 Tweet

#### Posting Permissions

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