# Partial rank correlations in SPSS

## Problem

I wish to use SPSS to find the partial correlation of a pair of variables, controlling for a set of additional variables. However, I want the partial correlation to be a rank correlation, such as the Spearman rho, rather than a Pearson correlation. The Partial Corr procedure in SPSS does not provide a rank correlation option. How can I request a partial rank correlation in SPSS?

## Resolving The Problem

Although the PARTIAL CORR procedure in SPSS does not have a way of specifying rank correlations, there is a way to work around this problem, as follows:

Use the /MATRIX OUT subcommand in NONPAR CORR (Nonparametric correlation) procedure to save a matrix of Spearman Rho correlations as the current data set. The PARTIAL CORR procedure can read this matrix as the input data by using the /MATRIX IN subcommand, so that the partial correlations computed are based on Spearman rhos. The NONPAR CORR and PARTIAL CORR procedures must be run from a syntax window in order to use the /MATRIX subcommands. An example follows:

NONPAR CORR salbeg time edlevel age
/MISSING = LISTWISE
/MATRIX OUT(*).
RECODE rowtype_ ('RHO'='CORR') .
PARTIAL CORR salbeg time edlevel BY age
/MISSING = LISTWISE
/MATRIX IN(*).

The '*' in the /MATRIX subcommands refer to the active data file. In the NONPAR CORR procedure, the matrix of Spearman rho correlations becomes the current file in the Data Editor. In the PARTIAL CORR command, the data is read from the current active data file, i.e the matrix of Spearman rho correlations. If you have made changes in your data file that need to be saved, be sure to save the file before running these commands.

In SPSS matrix data files, the variable ROWTYPE_ indicates the type of data stored in each row of the matrix. The PARTIAL CORR command expects ROWTYPE_ to equal 'CORR', whereas NONPAR CORR saves ROWTYPE_ as 'RHO' when the matrix is a set of Spearman rho correlations. The RECODE command changes the label of ROWTYPE_ so that PARTIAL CORR will analyze the matrix. The correlation values are unchanged by this recode and still represent Spearman rho correlations.

Note that we specified /MISSING = LISTWISE in both the NONPAR CORR and PARTIAL CORR commands. LISTWISE missing deletion means that the correlations in the matrix will be calculated by using only those cases that have valid data on all of the variables listed in the command. For NONPAR CORR, the default is PAIRWISE deletion, where each correlation is based on all of the cases with valid values for that pair of variables. A matrix of pairwise Ns is included in the matrix data file when MISSING = PAIRWISE. If you want the partial correlations to be based on listwise deletion, specify /MISSING LISTWISE in the NONPAR CORR command. In the PARTIAL CORR command, listwise deletion is the default, but it is specified here for demonstration purposes. The /MISSING = ANALYSIS subcommand would be used for pairwise missing data.

The PARTIAL CORR procedure prints each element in the partial correlation matrix with its significance level (for the null hypothesis that the partial correlation equals 0) and its degrees of freedom ('df'). By default, the two-tailed significance level is printed. You can request one-tailed significance levels by adding a /SIGNIFICANCE subcommand with the keyword ONETAILED, as in:

PARTIAL CORR salbeg time edlevel BY age
/significance = onetail
/MISSING = LISTWISE
/MATRIX IN(*).

For a discussion of nonparametric measures of partial correlation, including the use of Spearman rho, see:

Conover, W.J. (1999), "Practical Nonparametric Statistics (3rd Ed.). New York: Wiley, (p. 327-328).

[{"Product":{"code":"SSLVMB","label":"SPSS Statistics"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Not Applicable","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

34217

Modified date:
16 April 2020

swg21474822