Multiple correlations with pairs of variables and their respective pairs of residual variables

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Multiple correlations with pairs of variables and their respective pairs of residual variables

userTC
I wonder you could help work out a simpler syntax.

I have 7 variables and have done a regression with each of them as a DV and
a particular IV and have saved the unstandardised residual scores for each
of those regressions. This is because I wanted to remove the shared variance
from each of those DVs with the specific IV.

Then I want to correlate these pairs of variables with their residual
variables separately (not all in one matrix). This is because I need to add
these matrices in a particular calculator which asks for 4x4 matrix.

To do that I would have about 21 correlation commands to produce 21
correlation matrices. I will also be repeating this by using few other IVs
so there will be more than 100 correlations in total.

So this is how I've started now:

CORRELATIONS

/VARIABLES=v1 v2 res_v1 res_v2

/PRINT=TWOTAIL SIG

/MISSING=PAIRWISE.

CORRELATIONS

/VARIABLES=v1 v3 res_v1 res_v3

/PRINT=TWOTAIL SIG

/MISSING=PAIRWISE.

CORRELATIONS

/VARIABLES=v2 v3 res_v2 res_v3

/PRINT=TWOTAIL SIG

/MISSING=PAIRWISE.

And so on...until all pairs are done.

Would there be a simpler syntax than to repeating this command 100 times?

Thanks for your help!



--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Multiple correlations with pairs of variables and their respective pairs of residual variables

Kornbrot, Diana
If you use paired t-test for all pairs you will obtain all individual means and se all pairwise correlation an all t tests
Or do factor analysis with options for descriptive and correlations
Residuals may be calculated from SEs

Sent from my iPhone

> On 1 Sep 2020, at 06:26, userTC <[hidden email]> wrote:
>
> I wonder you could help work out a simpler syntax.
>
> I have 7 variables and have done a regression with each of them as a DV and
> a particular IV and have saved the unstandardised residual scores for each
> of those regressions. This is because I wanted to remove the shared variance
> from each of those DVs with the specific IV.
>
> Then I want to correlate these pairs of variables with their residual
> variables separately (not all in one matrix). This is because I need to add
> these matrices in a particular calculator which asks for 4x4 matrix.
>
> To do that I would have about 21 correlation commands to produce 21
> correlation matrices. I will also be repeating this by using few other IVs
> so there will be more than 100 correlations in total.
>
> So this is how I've started now:
>
> CORRELATIONS
>
> /VARIABLES=v1 v2 res_v1 res_v2
>
> /PRINT=TWOTAIL SIG
>
> /MISSING=PAIRWISE.
>
> CORRELATIONS
>
> /VARIABLES=v1 v3 res_v1 res_v3
>
> /PRINT=TWOTAIL SIG
>
> /MISSING=PAIRWISE.
>
> CORRELATIONS
>
> /VARIABLES=v2 v3 res_v2 res_v3
>
> /PRINT=TWOTAIL SIG
>
> /MISSING=PAIRWISE.
>
> And so on...until all pairs are done.
>
> Would there be a simpler syntax than to repeating this command 100 times?
>
> Thanks for your help!
>
>
>
> --
> Sent from: http://spssx-discussion.1045642.n5.nabble.com/
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> [hidden email] (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Multiple correlations with pairs of variables and their respective pairs of residual variables

Rich Ulrich
In reply to this post by userTC
Well, for one compact set that includes (I think) many of the correlations
that you want, you could look at the part-corr matrix of the 7 variables
while partialing out your particular independent variable.

Please, what are you hoping to get, in the end?  My imagination is failing me.

And, if you point us at the end result, someone might have a quicker way
to get there.

By the way, I think the relations among the correlations that you do describe
are going to be screwed up (if looked at closely) if you have different Ns owing
to MISSING scores -- your syntax-example suggests there are Missing.

--
Rich Ulrich

From: SPSSX(r) Discussion <[hidden email]> on behalf of userTC <[hidden email]>
Sent: Monday, August 31, 2020 8:28 PM
To: [hidden email] <[hidden email]>
Subject: Multiple correlations with pairs of variables and their respective pairs of residual variables
 
I wonder you could help work out a simpler syntax.

I have 7 variables and have done a regression with each of them as a DV and
a particular IV and have saved the unstandardised residual scores for each
of those regressions. This is because I wanted to remove the shared variance
from each of those DVs with the specific IV.

Then I want to correlate these pairs of variables with their residual
variables separately (not all in one matrix). This is because I need to add
these matrices in a particular calculator which asks for 4x4 matrix.

To do that I would have about 21 correlation commands to produce 21
correlation matrices. I will also be repeating this by using few other IVs
so there will be more than 100 correlations in total.

So this is how I've started now:

CORRELATIONS

/VARIABLES=v1 v2 res_v1 res_v2

/PRINT=TWOTAIL SIG

/MISSING=PAIRWISE.

CORRELATIONS

/VARIABLES=v1 v3 res_v1 res_v3

/PRINT=TWOTAIL SIG

/MISSING=PAIRWISE.

CORRELATIONS

/VARIABLES=v2 v3 res_v2 res_v3

/PRINT=TWOTAIL SIG

/MISSING=PAIRWISE.

And so on...until all pairs are done.

Would there be a simpler syntax than to repeating this command 100 times?

Thanks for your help!



--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Multiple correlations with pairs of variables and their respective pairs of residual variables

userTC
Thank you for your suggestions.

Doing all the correlations at once would not work. Or should I say, I would
get the same results but there would be lots of searching for the right
ones, and copying and pasting if I correlated all the variables in a single
correlation matrix.

What I am trying to do is correlate pairs of variables with each other and
with their respective residual variables (which I saved as variables from
the regressions I've done previously).

Once I obtain the correlations in a 4x4 matrix I need to paste it into a
calculator to work out the significant difference between the adjusted and
unadjusted correlations. This calculator converts the Pearson correlations
to Fisher's Z and then tests the significance of the difference between
them.

I use the calculator which treats correlations as dependent but
non-overlapping, which is the last table in this excel sheet ( link
<https://redirect.viglink.com/?format=go&jsonp=vglnk_159895466727812&key=949efb41171ac6ec1bf7f206d57e90b8&libId=kejsaxec01021u9s000DAbijrkmcs&loc=https%3A%2F%2Fwww.r-bloggers.com%2Fcomparing-correlations-independent-and-dependent-overlapping-or-non-overlapping%2F&v=1&out=https%3A%2F%2Fseriousstats.files.wordpress.com%2F2012%2F02%2Fzou-2007-differences-in-r-master.xls&ref=https%3A%2F%2Fwww.google.com%2F&title=Comparing%20correlations%3A%20independent%20and%20dependent%20(overlapping%20or%20non-overlapping)%20%7C%20R-bloggers&txt=Excel%20spreadsheet%20>
). See /"Zou, G. Y. (2007). Toward using confidence intervals to compare
correlations. Psychological Methods, 12, 399-413./" for details on
comparisons between dependent correlations.


While I could just run these correlations one after another, and get the
same result, I am trying to find a way to reduce the amount of text in the
syntax because I am writing the syntax to make it publicly available so that
others can replicate it. So trying to keep it nice and neat.

However, I worked out that I could reduce the amount of text by listing all
the variables under one correlation command it this way:

CORRELATIONS

/VARIABLES=v1 v2 res_v1 res_v2

/VARIABLES=v1 v3 res_v1 res_v3

/VARIABLES=v2 v3 res_v2 res_v3

/MISSING=PAIRWISE.


That can do the job for now but would be good if I can shorten it even
further as I still have about 100 of those combinations to run. It's not the
output that I'm concerned about, just the syntax.

And there will be no missing values as I've imputed them. You're right, the
missing values option is not needed, thanks for pointing that out.

Tanja






--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Multiple correlations with pairs of variables and their respective pairs of residual variables

David Marso-2
In reply to this post by userTC
KISS( Keep it stupid simple).
Do all of the variables at one time and let the devil sort it out.
Use OUTFILE on CORR command and manipulate the resulting data.  I am with Rich as far as my imagination failing. What precisely are you attempting to achieve.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Multiple correlations with pairs of variables and their respective pairs of residual variables

Art Kendall
In reply to this post by userTC
Please tell us the purpose and context of this effort?

Understanding the substantive questions, whether the variables are intended
as items in summative scales, etc. might allow us to suggest ways to reach
your goals.



-----
Art Kendall
Social Research Consultants
--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Multiple correlations with pairs of variables and their respective pairs of residual variables

Jon Peck
In reply to this post by Rich Ulrich
I also don't know where this is going, but
- the correlation of the residuals with any of the regressors in that regression will always be zero, so what's the point?
- if you want a consistent case base so that missing value deletion is based on all the variables across the set of regressions, you  can use the VARIABLES subcommand of REGESSION.  You can even specify ALL there to filter based on every variable.

On Tue, Sep 1, 2020 at 1:22 AM Rich Ulrich <[hidden email]> wrote:
Well, for one compact set that includes (I think) many of the correlations
that you want, you could look at the part-corr matrix of the 7 variables
while partialing out your particular independent variable.

Please, what are you hoping to get, in the end?  My imagination is failing me.

And, if you point us at the end result, someone might have a quicker way
to get there.

By the way, I think the relations among the correlations that you do describe
are going to be screwed up (if looked at closely) if you have different Ns owing
to MISSING scores -- your syntax-example suggests there are Missing.

--
Rich Ulrich

From: SPSSX(r) Discussion <[hidden email]> on behalf of userTC <[hidden email]>
Sent: Monday, August 31, 2020 8:28 PM
To: [hidden email] <[hidden email]>
Subject: Multiple correlations with pairs of variables and their respective pairs of residual variables
 
I wonder you could help work out a simpler syntax.

I have 7 variables and have done a regression with each of them as a DV and
a particular IV and have saved the unstandardised residual scores for each
of those regressions. This is because I wanted to remove the shared variance
from each of those DVs with the specific IV.

Then I want to correlate these pairs of variables with their residual
variables separately (not all in one matrix). This is because I need to add
these matrices in a particular calculator which asks for 4x4 matrix.

To do that I would have about 21 correlation commands to produce 21
correlation matrices. I will also be repeating this by using few other IVs
so there will be more than 100 correlations in total.

So this is how I've started now:

CORRELATIONS

/VARIABLES=v1 v2 res_v1 res_v2

/PRINT=TWOTAIL SIG

/MISSING=PAIRWISE.

CORRELATIONS

/VARIABLES=v1 v3 res_v1 res_v3

/PRINT=TWOTAIL SIG

/MISSING=PAIRWISE.

CORRELATIONS

/VARIABLES=v2 v3 res_v2 res_v3

/PRINT=TWOTAIL SIG

/MISSING=PAIRWISE.

And so on...until all pairs are done.

Would there be a simpler syntax than to repeating this command 100 times?

Thanks for your help!



--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Multiple correlations with pairs of variables and their respective pairs of residual variables

Jon Peck
In reply to this post by userTC
I still am not clear on what you are doing, but  you might find the STATS CORRELATIONS extension command, installablle from Extensions > Extension Hub useful.  It has a different layout of the correlations (and it gives CIs).  Try it out to  see if it helps.

On Tue, Sep 1, 2020 at 5:43 PM userTC <[hidden email]> wrote:
Thank you for your suggestions.

Doing all the correlations at once would not work. Or should I say, I would
get the same results but there would be lots of searching for the right
ones, and copying and pasting if I correlated all the variables in a single
correlation matrix.

What I am trying to do is correlate pairs of variables with each other and
with their respective residual variables (which I saved as variables from
the regressions I've done previously).

Once I obtain the correlations in a 4x4 matrix I need to paste it into a
calculator to work out the significant difference between the adjusted and
unadjusted correlations. This calculator converts the Pearson correlations
to Fisher's Z and then tests the significance of the difference between
them.

I use the calculator which treats correlations as dependent but
non-overlapping, which is the last table in this excel sheet ( link
<https://redirect.viglink.com/?format=go&jsonp=vglnk_159895466727812&key=949efb41171ac6ec1bf7f206d57e90b8&libId=kejsaxec01021u9s000DAbijrkmcs&loc=https%3A%2F%2Fwww.r-bloggers.com%2Fcomparing-correlations-independent-and-dependent-overlapping-or-non-overlapping%2F&v=1&out=https%3A%2F%2Fseriousstats.files.wordpress.com%2F2012%2F02%2Fzou-2007-differences-in-r-master.xls&ref=https%3A%2F%2Fwww.google.com%2F&title=Comparing%20correlations%3A%20independent%20and%20dependent%20(overlapping%20or%20non-overlapping)%20%7C%20R-bloggers&txt=Excel%20spreadsheet%20>
). See /"Zou, G. Y. (2007). Toward using confidence intervals to compare
correlations. Psychological Methods, 12, 399-413./" for details on
comparisons between dependent correlations.


While I could just run these correlations one after another, and get the
same result, I am trying to find a way to reduce the amount of text in the
syntax because I am writing the syntax to make it publicly available so that
others can replicate it. So trying to keep it nice and neat.

However, I worked out that I could reduce the amount of text by listing all
the variables under one correlation command it this way:

CORRELATIONS

/VARIABLES=v1 v2 res_v1 res_v2

/VARIABLES=v1 v3 res_v1 res_v3

/VARIABLES=v2 v3 res_v2 res_v3

/MISSING=PAIRWISE.


That can do the job for now but would be good if I can shorten it even
further as I still have about 100 of those combinations to run. It's not the
output that I'm concerned about, just the syntax.

And there will be no missing values as I've imputed them. You're right, the
missing values option is not needed, thanks for pointing that out.

Tanja






--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Multiple correlations with pairs of variables and their respective pairs of residual variables

Bruce Weaver
Administrator
In reply to this post by userTC
Hello Tanja.  I think part of the problem people are having is that you have
not provided a complete example (with data) of what you are trying to do.
Does this "toy" example capture it?  If not, please correct it to make it
match what you want to do.  

* Modify path on the next line to show where the sample data sets are
stored.
GET FILE='C:\SPSSdata\survey_sample.sav'.

* Make variable names match Tanja's example.
DO REPEAT old =  educ paeduc maeduc speduc / new = v1 to v4.
 COMPUTE new = old.
END REPEAT.

* Suppose Age is the "specific IV".
REGRESSION /DEPENDENT v1 /METHOD=ENTER age /SAVE ZRESID(res_v1).
REGRESSION /DEPENDENT v2 /METHOD=ENTER age /SAVE ZRESID(res_v2).
REGRESSION /DEPENDENT v3 /METHOD=ENTER age /SAVE ZRESID(res_v3).
REGRESSION /DEPENDENT v4 /METHOD=ENTER age /SAVE ZRESID(res_v4).

* Now show the desired correlations.
CORRELATIONS
 /VARIABLES=v1 v2 res_v1 res_v2
 /VARIABLES=v1 v3 res_v1 res_v3
 /VARIABLES=v1 v4 res_v1 res_v4
 /VARIABLES=v2 v3 res_v2 res_v3
 /VARIABLES=v2 v4 res_v2 res_v4
 /VARIABLES=v3 v4 res_v3 res_v4
 /MISSING=PAIRWISE.




userTC wrote

> Thank you for your suggestions.
>
> Doing all the correlations at once would not work. Or should I say, I
> would
> get the same results but there would be lots of searching for the right
> ones, and copying and pasting if I correlated all the variables in a
> single
> correlation matrix.
>
> What I am trying to do is correlate pairs of variables with each other and
> with their respective residual variables (which I saved as variables from
> the regressions I've done previously).
>
> Once I obtain the correlations in a 4x4 matrix I need to paste it into a
> calculator to work out the significant difference between the adjusted and
> unadjusted correlations. This calculator converts the Pearson correlations
> to Fisher's Z and then tests the significance of the difference between
> them.
>
> I use the calculator which treats correlations as dependent but
> non-overlapping, which is the last table in this excel sheet ( link
> &lt;https://redirect.viglink.com/?format=go&amp;jsonp=vglnk_159895466727812&amp;key=949efb41171ac6ec1bf7f206d57e90b8&amp;libId=kejsaxec01021u9s000DAbijrkmcs&amp;loc=https%3A%2F%2Fwww.r-bloggers.com%2Fcomparing-correlations-independent-and-dependent-overlapping-or-non-overlapping%2F&amp;v=1&amp;out=https%3A%2F%2Fseriousstats.files.wordpress.com%2F2012%2F02%2Fzou-2007-differences-in-r-master.xls&amp;ref=https%3A%2F%2Fwww.google.com%2F&amp;title=Comparing%20correlations%3A%20independent%20and%20dependent%20(overlapping%20or%20non-overlapping)%20%7C%20R-bloggers&amp;txt=Excel%20spreadsheet%20&gt; 
> ). See /"Zou, G. Y. (2007). Toward using confidence intervals to compare
> correlations. Psychological Methods, 12, 399-413./" for details on
> comparisons between dependent correlations.
>
>
> While I could just run these correlations one after another, and get the
> same result, I am trying to find a way to reduce the amount of text in the
> syntax because I am writing the syntax to make it publicly available so
> that
> others can replicate it. So trying to keep it nice and neat.
>
> However, I worked out that I could reduce the amount of text by listing
> all
> the variables under one correlation command it this way:
>
> CORRELATIONS
>
> /VARIABLES=v1 v2 res_v1 res_v2
>
> /VARIABLES=v1 v3 res_v1 res_v3
>
> /VARIABLES=v2 v3 res_v2 res_v3
>
> /MISSING=PAIRWISE.
>
>
> That can do the job for now but would be good if I can shorten it even
> further as I still have about 100 of those combinations to run. It's not
> the
> output that I'm concerned about, just the syntax.
>
> And there will be no missing values as I've imputed them. You're right,
> the
> missing values option is not needed, thanks for pointing that out.
>
> Tanja
>
>
>
>
>
>
> --
> Sent from: http://spssx-discussion.1045642.n5.nabble.com/
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Multiple correlations with pairs of variables and their respective pairs of residual variables

Jon Peck
If Bruce is on the right track, this whole set of regression and correlation commands could be automated using a little Python or, gasp, macro code so that the syntax could be very compact.  Further, the result could be saved as an SPSS dataset using OMS, and  you could use SELECT IF to cut it down to just show the correlation rows.

On Wed, Sep 2, 2020 at 6:58 AM Bruce Weaver <[hidden email]> wrote:
Hello Tanja.  I think part of the problem people are having is that you have
not provided a complete example (with data) of what you are trying to do.
Does this "toy" example capture it?  If not, please correct it to make it
match what you want to do. 

* Modify path on the next line to show where the sample data sets are
stored.
GET FILE='C:\SPSSdata\survey_sample.sav'.

* Make variable names match Tanja's example.
DO REPEAT old =  educ paeduc maeduc speduc / new = v1 to v4.
 COMPUTE new = old.
END REPEAT.

* Suppose Age is the "specific IV".
REGRESSION /DEPENDENT v1 /METHOD=ENTER age /SAVE ZRESID(res_v1).
REGRESSION /DEPENDENT v2 /METHOD=ENTER age /SAVE ZRESID(res_v2).
REGRESSION /DEPENDENT v3 /METHOD=ENTER age /SAVE ZRESID(res_v3).
REGRESSION /DEPENDENT v4 /METHOD=ENTER age /SAVE ZRESID(res_v4).

* Now show the desired correlations.
CORRELATIONS
 /VARIABLES=v1 v2 res_v1 res_v2
 /VARIABLES=v1 v3 res_v1 res_v3
 /VARIABLES=v1 v4 res_v1 res_v4
 /VARIABLES=v2 v3 res_v2 res_v3
 /VARIABLES=v2 v4 res_v2 res_v4
 /VARIABLES=v3 v4 res_v3 res_v4
 /MISSING=PAIRWISE.




userTC wrote
> Thank you for your suggestions.
>
> Doing all the correlations at once would not work. Or should I say, I
> would
> get the same results but there would be lots of searching for the right
> ones, and copying and pasting if I correlated all the variables in a
> single
> correlation matrix.
>
> What I am trying to do is correlate pairs of variables with each other and
> with their respective residual variables (which I saved as variables from
> the regressions I've done previously).
>
> Once I obtain the correlations in a 4x4 matrix I need to paste it into a
> calculator to work out the significant difference between the adjusted and
> unadjusted correlations. This calculator converts the Pearson correlations
> to Fisher's Z and then tests the significance of the difference between
> them.
>
> I use the calculator which treats correlations as dependent but
> non-overlapping, which is the last table in this excel sheet ( link
> &lt;https://redirect.viglink.com/?format=go&amp;jsonp=vglnk_159895466727812&amp;key=949efb41171ac6ec1bf7f206d57e90b8&amp;libId=kejsaxec01021u9s000DAbijrkmcs&amp;loc=https%3A%2F%2Fwww.r-bloggers.com%2Fcomparing-correlations-independent-and-dependent-overlapping-or-non-overlapping%2F&amp;v=1&amp;out=https%3A%2F%2Fseriousstats.files.wordpress.com%2F2012%2F02%2Fzou-2007-differences-in-r-master.xls&amp;ref=https%3A%2F%2Fwww.google.com%2F&amp;title=Comparing%20correlations%3A%20independent%20and%20dependent%20(overlapping%20or%20non-overlapping)%20%7C%20R-bloggers&amp;txt=Excel%20spreadsheet%20&gt;
> ). See /"Zou, G. Y. (2007). Toward using confidence intervals to compare
> correlations. Psychological Methods, 12, 399-413./" for details on
> comparisons between dependent correlations.
>
>
> While I could just run these correlations one after another, and get the
> same result, I am trying to find a way to reduce the amount of text in the
> syntax because I am writing the syntax to make it publicly available so
> that
> others can replicate it. So trying to keep it nice and neat.
>
> However, I worked out that I could reduce the amount of text by listing
> all
> the variables under one correlation command it this way:
>
> CORRELATIONS
>
> /VARIABLES=v1 v2 res_v1 res_v2
>
> /VARIABLES=v1 v3 res_v1 res_v3
>
> /VARIABLES=v2 v3 res_v2 res_v3
>
> /MISSING=PAIRWISE.
>
>
> That can do the job for now but would be good if I can shorten it even
> further as I still have about 100 of those combinations to run. It's not
> the
> output that I'm concerned about, just the syntax.
>
> And there will be no missing values as I've imputed them. You're right,
> the
> missing values option is not needed, thanks for pointing that out.
>
> Tanja
>
>
>
>
>
>
> --
> Sent from: http://spssx-discussion.1045642.n5.nabble.com/
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Multiple correlations with pairs of variables and their respective pairs of residual variables

Bruce Weaver
Administrator
I did consider suggesting a macro, Jon, but didn't want to upset you and the
other Pythonistas.  ;-)

Yes, OMS would be helpful too, if I'm on the right track.  


Jon Peck wrote
> If Bruce is on the right track, this whole set of regression and
> correlation commands could be automated using a little Python or, gasp,
> macro code so that the syntax could be very compact.  Further, the result
> could be saved as an SPSS dataset using OMS, and  you could use SELECT IF
> to cut it down to just show the correlation rows.





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Multiple correlations with pairs of variables and their respective pairs of residual variables

Jon Peck
It would be helpful for the OP to describe in more detail exactly how the correlations would be transferred in order to come up with the best organization on the SPSS side.

On Wed, Sep 2, 2020 at 8:47 AM Bruce Weaver <[hidden email]> wrote:
I did consider suggesting a macro, Jon, but didn't want to upset you and the
other Pythonistas.  ;-)

Yes, OMS would be helpful too, if I'm on the right track. 


Jon Peck wrote
> If Bruce is on the right track, this whole set of regression and
> correlation commands could be automated using a little Python or, gasp,
> macro code so that the syntax could be very compact.  Further, the result
> could be saved as an SPSS dataset using OMS, and  you could use SELECT IF
> to cut it down to just show the correlation rows.





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Multiple correlations with pairs of variables and their respective pairs of residual variables

Art Kendall
I do not have access to Psychological methods these days.
Fisher's Z has been discussed on this list previously.
In the archives Bruce said
COMPUTE rprime = 0.5*ln((1+r)/(1-r)).

In 2006 Marta posted macros to compare correlations.
Search ‘comparing correlations’ in the archives
If you have the article and you have the formulae in Excel, why not do
everything directly in SPSS?

Start with the center of what you want, an example 4 by R matrix.  Work out
what you would do.  Then generalize with OMS, Python, or macro.




-----
Art Kendall
Social Research Consultants
--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Multiple correlations with pairs of variables and their respective pairs of residual variables

Bruce Weaver
Administrator
Hi Art.  Please note too that Karl Wuensch and I published an article in 2013
describing all of the common methods for comparing correlations (and
regression coefficients).  I contributed SPSS code, and Karl contributed SAS
code.  You can find the code at the first two links below and the article at
the 3rd:

https://sites.google.com/a/lakeheadu.ca/bweaver/Home/statistics/spss/my-spss-page/weaver_wuensch
http://core.ecu.edu/psyc/wuenschk/W&W/W&W-SAS.htm
https://link.springer.com/article/10.3758%2Fs13428-012-0289-7

In 2014, Ray Koopman and I published another article describing a macro to
compute CIs for Pearson correlations.  (I should not say this, as it will
likely cost me some citations, but Jon Peck has since written a nice Python
extension command that you might want to use instead.  It's called STATS
CORRELATIONS, IIRC.)  ;-)  

   https://www.tqmp.org/RegularArticles/vol10-1/p029/p029.pdf
 
https://sites.google.com/a/lakeheadu.ca/bweaver/Home/statistics/spss/my-spss-page/rhoci

While we were working on that article, Ray taught me that Fisher's r-to-z
transformation is really the inverse hyperbolic tangent, and the
back-transformation is the hyperbolic tangent.  SPSS does not have those
functions, but Ray showed me that one can get them by using IDF.LOGISTIC()
and CDF.LOGISTIC() functions.  Here are several comment lines from my !rhoCI
macro definition file that describe the basic equations:


* The macro uses the following basic equations.

*  Zr = arctanh[r] <==> r = tanh[Zr]

*  d = z_alpha / sqrt[n-3]

*  t = tanh[d]

*                       tanh[Zr] +- tanh[d]     r +- t
* ci = tanh[Zr +- d] = --------------------- = --------
*                      1 +- tanh[Zr]*tanh[d]   1 +- r*t

* The rightmost term in the last equation works even when r = +1 or -1.

* SPSS has no tanh and arctanh functions.  
* HOWEVER, one can use IDF.LOGISTIC and CDF.LOGISTIC as follows:

*  arctanh[r] = .5*ln((1+r)/(1-r)) = .5*idf.logistic((1+r)/2,0,1)
*  tanh[d] = (exp(2*d)-1)/(exp(2*d)+1) = 2*cdf.logistic(2*d,0,1)-1

* SOURCES:
* http://people.math.sfu.ca/~cbm/aands/page_83.htm (see Equation 4.5.26).
* http://people.math.sfu.ca/~cbm/aands/intro.htm#001 .



Art Kendall wrote

> I do not have access to Psychological methods these days.
> Fisher's Z has been discussed on this list previously.
> In the archives Bruce said
> COMPUTE rprime = 0.5*ln((1+r)/(1-r)).
>
> In 2006 Marta posted macros to compare correlations.
> Search ‘comparing correlations’ in the archives
> If you have the article and you have the formulae in Excel, why not do
> everything directly in SPSS?
>
> Start with the center of what you want, an example 4 by R matrix.  Work
> out
> what you would do.  Then generalize with OMS, Python, or macro.
>
>
>
>
> -----
> Art Kendall
> Social Research Consultants
> --
> Sent from: http://spssx-discussion.1045642.n5.nabble.com/
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Multiple correlations with pairs of variables and their respective pairs of residual variables

Jon Peck
The missing trig functions can be obtained via BEGIN PROGRAM. using the Python math module:
math.atan and math.atanh.

And I can confirm that it is STATS CORRELATIONS that Bruce is referring to.  I wrote that in consultation with Bruce.  It, in turn, uses that Python math module.  That extension also offers bootstrap cis.

STATS CORRELATIONS can be installed from the Extensions > Extension Hub menu.

On Wed, Sep 2, 2020 at 1:58 PM Bruce Weaver <[hidden email]> wrote:
Hi Art.  Please note too that Karl Wuensch and I published an article in 2013
describing all of the common methods for comparing correlations (and
regression coefficients).  I contributed SPSS code, and Karl contributed SAS
code.  You can find the code at the first two links below and the article at
the 3rd:

https://sites.google.com/a/lakeheadu.ca/bweaver/Home/statistics/spss/my-spss-page/weaver_wuensch
http://core.ecu.edu/psyc/wuenschk/W&W/W&W-SAS.htm
https://link.springer.com/article/10.3758%2Fs13428-012-0289-7

In 2014, Ray Koopman and I published another article describing a macro to
compute CIs for Pearson correlations.  (I should not say this, as it will
likely cost me some citations, but Jon Peck has since written a nice Python
extension command that you might want to use instead.  It's called STATS
CORRELATIONS, IIRC.)  ;-) 

   https://www.tqmp.org/RegularArticles/vol10-1/p029/p029.pdf

https://sites.google.com/a/lakeheadu.ca/bweaver/Home/statistics/spss/my-spss-page/rhoci

While we were working on that article, Ray taught me that Fisher's r-to-z
transformation is really the inverse hyperbolic tangent, and the
back-transformation is the hyperbolic tangent.  SPSS does not have those
functions, but Ray showed me that one can get them by using IDF.LOGISTIC()
and CDF.LOGISTIC() functions.  Here are several comment lines from my !rhoCI
macro definition file that describe the basic equations:


* The macro uses the following basic equations.

*  Zr = arctanh[r] <==> r = tanh[Zr]

*  d = z_alpha / sqrt[n-3]

*  t = tanh[d]

*                       tanh[Zr] +- tanh[d]     r +- t
* ci = tanh[Zr +- d] = --------------------- = --------
*                      1 +- tanh[Zr]*tanh[d]   1 +- r*t

* The rightmost term in the last equation works even when r = +1 or -1.

* SPSS has no tanh and arctanh functions. 
* HOWEVER, one can use IDF.LOGISTIC and CDF.LOGISTIC as follows:

*  arctanh[r] = .5*ln((1+r)/(1-r)) = .5*idf.logistic((1+r)/2,0,1)
*  tanh[d] = (exp(2*d)-1)/(exp(2*d)+1) = 2*cdf.logistic(2*d,0,1)-1

* SOURCES:
* http://people.math.sfu.ca/~cbm/aands/page_83.htm (see Equation 4.5.26).
* http://people.math.sfu.ca/~cbm/aands/intro.htm#001 .



Art Kendall wrote
> I do not have access to Psychological methods these days.
> Fisher's Z has been discussed on this list previously.
> In the archives Bruce said
> COMPUTE rprime = 0.5*ln((1+r)/(1-r)).
>
> In 2006 Marta posted macros to compare correlations.
> Search ‘comparing correlations’ in the archives
> If you have the article and you have the formulae in Excel, why not do
> everything directly in SPSS?
>
> Start with the center of what you want, an example 4 by R matrix.  Work
> out
> what you would do.  Then generalize with OMS, Python, or macro.
>
>
>
>
> -----
> Art Kendall
> Social Research Consultants
> --
> Sent from: http://spssx-discussion.1045642.n5.nabble.com/
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Multiple correlations with pairs of variables and their respective pairs of residual variables

Art Kendall
The OP may find that you have already done what is needed.

Do you have access to the article the OP mentioned?





-----
Art Kendall
Social Research Consultants
--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Multiple correlations with pairs of variables and their respective pairs of residual variables

Brian Dates
In reply to this post by userTC
Here's the article from Psych. Methods.

Toward_Using_Confidence_Intervals_to_Compare_Correlations.pdf
<http://spssx-discussion.1045642.n5.nabble.com/file/t341458/Toward_Using_Confidence_Intervals_to_Compare_Correlations.pdf>  

Brian



--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Multiple correlations with pairs of variables and their respective pairs of residual variables

Bruce Weaver
Administrator
In reply to this post by Art Kendall
If you mean the Zou (2007) article, yes, Karl Wuensch and I did cite that
article in your 2013 paper.  

Zou, G. Y. (2007). Toward using confidence intervals to compare
correlations. Psychological Methods, 12, 399–413.



Art Kendall wrote

> The OP may find that you have already done what is needed.
>
> Do you have access to the article the OP mentioned?
>
>
>
>
>
> -----
> Art Kendall
> Social Research Consultants
> --
> Sent from: http://spssx-discussion.1045642.n5.nabble.com/
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: Multiple correlations with pairs of variables and their respective pairs of residual variables

Rich Ulrich
In reply to this post by Bruce Weaver
Bruce,
It looks to me like your programs provide TWO versions of the test.
A comment in one file says that the Steiger test (which I think of as
the test on variances) outperformed the test by Zou (which I think of as
the test using Fisher's z) in an article comparing them.

I read an article about that comparison, in which variance-better-than-z was
the general conclusion. (Two different articles? I don't know.)  IIRC, there
was also mention that a study's /design/ could make the Zou test more
appropriate.  For this design, comparing the r for (V1,V2) with the r for the
residualized versions, I think "variance" must be more appropriate. The
difference between them will be trivial when the scaling of r is similar to
the scaling of z, i.e., whenever r's are decently small.

However -- if the original outside covariate ("age" in your example), has
little influence, it could be that V1 and V1-adjusted (in the OP's example)
have an r that is close to 1.0.  In that case, tests could differ by non-trivial amounts.

--
Rich Ulrich


From: SPSSX(r) Discussion <[hidden email]> on behalf of Bruce Weaver <[hidden email]>
Sent: Wednesday, September 2, 2020 3:58 PM
To: [hidden email] <[hidden email]>
Subject: Re: Multiple correlations with pairs of variables and their respective pairs of residual variables
 
Hi Art.  Please note too that Karl Wuensch and I published an article in 2013
describing all of the common methods for comparing correlations (and
regression coefficients).  I contributed SPSS code, and Karl contributed SAS
code.  You can find the code at the first two links below and the article at
the 3rd:

https://sites.google.com/a/lakeheadu.ca/bweaver/Home/statistics/spss/my-spss-page/weaver_wuensch
http://core.ecu.edu/psyc/wuenschk/W&W/W&W-SAS.htm
https://link.springer.com/article/10.3758%2Fs13428-012-0289-7

In 2014, Ray Koopman and I published another article describing a macro to
compute CIs for Pearson correlations.  (I should not say this, as it will
likely cost me some citations, but Jon Peck has since written a nice Python
extension command that you might want to use instead.  It's called STATS
CORRELATIONS, IIRC.)  ;-) 

   https://www.tqmp.org/RegularArticles/vol10-1/p029/p029.pdf
 
https://sites.google.com/a/lakeheadu.ca/bweaver/Home/statistics/spss/my-spss-page/rhoci

While we were working on that article, Ray taught me that Fisher's r-to-z
transformation is really the inverse hyperbolic tangent, and the
back-transformation is the hyperbolic tangent.  SPSS does not have those
functions, but Ray showed me that one can get them by using IDF.LOGISTIC()
and CDF.LOGISTIC() functions.  Here are several comment lines from my !rhoCI
macro definition file that describe the basic equations:


* The macro uses the following basic equations.

*  Zr = arctanh[r] <==> r = tanh[Zr]

*  d = z_alpha / sqrt[n-3]

*  t = tanh[d]

*                       tanh[Zr] +- tanh[d]     r +- t
* ci = tanh[Zr +- d] = --------------------- = --------
*                      1 +- tanh[Zr]*tanh[d]   1 +- r*t

* The rightmost term in the last equation works even when r = +1 or -1.

* SPSS has no tanh and arctanh functions. 
* HOWEVER, one can use IDF.LOGISTIC and CDF.LOGISTIC as follows:

*  arctanh[r] = .5*ln((1+r)/(1-r)) = .5*idf.logistic((1+r)/2,0,1)
*  tanh[d] = (exp(2*d)-1)/(exp(2*d)+1) = 2*cdf.logistic(2*d,0,1)-1

* SOURCES:
* http://people.math.sfu.ca/~cbm/aands/page_83.htm (see Equation 4.5.26).
* http://people.math.sfu.ca/~cbm/aands/intro.htm#001 .



Art Kendall wrote
> I do not have access to Psychological methods these days.
> Fisher's Z has been discussed on this list previously.
> In the archives Bruce said
> COMPUTE rprime = 0.5*ln((1+r)/(1-r)).
>
> In 2006 Marta posted macros to compare correlations.
> Search ‘comparing correlations’ in the archives
> If you have the article and you have the formulae in Excel, why not do
> everything directly in SPSS?
>
> Start with the center of what you want, an example 4 by R matrix.  Work
> out
> what you would do.  Then generalize with OMS, Python, or macro.
>
>
>
>
> -----
> Art Kendall
> Social Research Consultants
> --
> Sent from: http://spssx-discussion.1045642.n5.nabble.com/
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Multiple correlations with pairs of variables and their respective pairs of residual variables

Rich Ulrich
Folks, 
Possible warning.
I don't know what this means, but I just now received a Reply to
my message here, addressed just to me, which looked innocent,
and contained a Windows Word  .doc document.  I don't have
Word, so I downloaded it.  Norton deleted it, reporting that it is
dangerous. 

The Sender is not a name I recognized, and has not contributed to
this thread under this name, but the context -- quoting my own post
here -- made it believable. "I have made some edits.  Please check."

Sender:

fmazariegos:  If this was innocent, be informed that I did not read the
file, and that you need to clean your system of a virus.  Or, that your
name or access has been hijacked.

As for me, I have to widen my usual precautions about, "Don't download
something from someone you don't trust."

--
Rich Ulrich

From: Rich Ulrich <[hidden email]>
Sent: Wednesday, September 2, 2020 5:23 PM
To: [hidden email] <[hidden email]>; Bruce Weaver <[hidden email]>
Subject: Re: Multiple correlations with pairs of variables and their respective pairs of residual variables
 
Bruce,
It looks to me like your programs provide TWO versions of the test.
A comment in one file says that the Steiger test (which I think of as
the test on variances) outperformed the test by Zou (which I think of as
the test using Fisher's z) in an article comparing them.

I read an article about that comparison, in which variance-better-than-z was
the general conclusion. (Two different articles? I don't know.)  IIRC, there
was also mention that a study's /design/ could make the Zou test more
appropriate.  For this design, comparing the r for (V1,V2) with the r for the
residualized versions, I think "variance" must be more appropriate. The
difference between them will be trivial when the scaling of r is similar to
the scaling of z, i.e., whenever r's are decently small.

However -- if the original outside covariate ("age" in your example), has
little influence, it could be that V1 and V1-adjusted (in the OP's example)
have an r that is close to 1.0.  In that case, tests could differ by non-trivial amounts.

--
Rich Ulrich


From: SPSSX(r) Discussion <[hidden email]> on behalf of Bruce Weaver <[hidden email]>
Sent: Wednesday, September 2, 2020 3:58 PM
To: [hidden email] <[hidden email]>
Subject: Re: Multiple correlations with pairs of variables and their respective pairs of residual variables
 
Hi Art.  Please note too that Karl Wuensch and I published an article in 2013
describing all of the common methods for comparing correlations (and
regression coefficients).  I contributed SPSS code, and Karl contributed SAS
code.  You can find the code at the first two links below and the article at
the 3rd:

https://sites.google.com/a/lakeheadu.ca/bweaver/Home/statistics/spss/my-spss-page/weaver_wuensch
http://core.ecu.edu/psyc/wuenschk/W&W/W&W-SAS.htm
https://link.springer.com/article/10.3758%2Fs13428-012-0289-7

In 2014, Ray Koopman and I published another article describing a macro to
compute CIs for Pearson correlations.  (I should not say this, as it will
likely cost me some citations, but Jon Peck has since written a nice Python
extension command that you might want to use instead.  It's called STATS
CORRELATIONS, IIRC.)  ;-) 

   https://www.tqmp.org/RegularArticles/vol10-1/p029/p029.pdf
 
https://sites.google.com/a/lakeheadu.ca/bweaver/Home/statistics/spss/my-spss-page/rhoci

While we were working on that article, Ray taught me that Fisher's r-to-z
transformation is really the inverse hyperbolic tangent, and the
back-transformation is the hyperbolic tangent.  SPSS does not have those
functions, but Ray showed me that one can get them by using IDF.LOGISTIC()
and CDF.LOGISTIC() functions.  Here are several comment lines from my !rhoCI
macro definition file that describe the basic equations:


* The macro uses the following basic equations.

*  Zr = arctanh[r] <==> r = tanh[Zr]

*  d = z_alpha / sqrt[n-3]

*  t = tanh[d]

*                       tanh[Zr] +- tanh[d]     r +- t
* ci = tanh[Zr +- d] = --------------------- = --------
*                      1 +- tanh[Zr]*tanh[d]   1 +- r*t

* The rightmost term in the last equation works even when r = +1 or -1.

* SPSS has no tanh and arctanh functions. 
* HOWEVER, one can use IDF.LOGISTIC and CDF.LOGISTIC as follows:

*  arctanh[r] = .5*ln((1+r)/(1-r)) = .5*idf.logistic((1+r)/2,0,1)
*  tanh[d] = (exp(2*d)-1)/(exp(2*d)+1) = 2*cdf.logistic(2*d,0,1)-1

* SOURCES:
* http://people.math.sfu.ca/~cbm/aands/page_83.htm (see Equation 4.5.26).
* http://people.math.sfu.ca/~cbm/aands/intro.htm#001 .



Art Kendall wrote
> I do not have access to Psychological methods these days.
> Fisher's Z has been discussed on this list previously.
> In the archives Bruce said
> COMPUTE rprime = 0.5*ln((1+r)/(1-r)).
>
> In 2006 Marta posted macros to compare correlations.
> Search ‘comparing correlations’ in the archives
> If you have the article and you have the formulae in Excel, why not do
> everything directly in SPSS?
>
> Start with the center of what you want, an example 4 by R matrix.  Work
> out
> what you would do.  Then generalize with OMS, Python, or macro.
>
>
>
>
> -----
> Art Kendall
> Social Research Consultants
> --
> Sent from: http://spssx-discussion.1045642.n5.nabble.com/
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
12