The CORR Procedure

Partial Correlation

A partial correlation measures the strength of a relationship between two variables, while controlling the effect of other variables. The Pearson partial correlation between two variables, after controlling for variables in the PARTIAL statement, is equivalent to the Pearson correlation between the residuals of the two variables after regression on the controlling variables.

Let bold y equals left-parenthesis y 1 comma y 2 comma ellipsis comma y Subscript v Baseline right-parenthesis be the set of variables to correlate and bold z equals left-parenthesis z 1 comma z 2 comma ellipsis comma z Subscript p Baseline right-parenthesis be the set of controlling variables. The population Pearson partial correlation between the ith and the jth variables of bold y given bold z is the correlation between errors left-parenthesis y Subscript i Baseline minus normal upper E left-parenthesis y Subscript i Baseline right-parenthesis right-parenthesis and left-parenthesis y Subscript j Baseline minus normal upper E left-parenthesis y Subscript j Baseline right-parenthesis right-parenthesis, where

normal upper E left-parenthesis y Subscript i Baseline right-parenthesis equals alpha Subscript i Baseline plus bold z bold-italic beta Subscript i Baseline normal a normal n normal d normal upper E left-parenthesis y Subscript j Baseline right-parenthesis equals alpha Subscript j Baseline plus bold z bold-italic beta Subscript j

are the regression models for variables y Subscript i and y Subscript j given the set of controlling variables bold z, respectively.

For a given sample of observations, a sample Pearson partial correlation between y Subscript i and y Subscript j given bold z is derived from the residuals y Subscript i Baseline minus ModifyingAbove y Subscript i Baseline With caret and y Subscript j Baseline minus ModifyingAbove y Subscript j Baseline With caret, where

ModifyingAbove y With caret Subscript i Baseline equals ModifyingAbove alpha With caret Subscript i Baseline plus bold z ModifyingAbove bold-italic beta With caret Subscript i Baseline normal a normal n normal d ModifyingAbove y With caret Subscript j Baseline equals ModifyingAbove alpha With caret Subscript j Baseline plus bold z ModifyingAbove bold-italic beta With caret Subscript j

are fitted values from regression models for variables y Subscript i and y Subscript j given bold z.

The partial corrected sums of squares and crossproducts (CSSCP) of bold y given bold z are the corrected sums of squares and crossproducts of the residuals bold y minus ModifyingAbove bold y With caret. Using these partial corrected sums of squares and crossproducts, you can calculate the partial covariances and partial correlations.

PROC CORR derives the partial corrected sums of squares and crossproducts matrix by applying the Cholesky decomposition algorithm to the CSSCP matrix. For Pearson partial correlations, let S be the partitioned CSSCP matrix between two sets of variables, bold z and bold y:

StartLayout 1st Row 1st Column bold upper S 2nd Column equals 3rd Column Start 2 By 2 Matrix 1st Row 1st Column bold upper S Subscript z z 2nd Column bold upper S Subscript z y 2nd Row 1st Column bold upper S prime Subscript z y 2nd Column bold upper S Subscript y y EndMatrix EndLayout

PROC CORR calculates upper S Subscript y y period z, the partial CSSCP matrix of bold y after controlling for bold z, by applying the Cholesky decomposition algorithm sequentially on the rows associated with bold z, the variables being partialled out.

After applying the Cholesky decomposition algorithm to each row associated with variables bold z, PROC CORR checks all higher-numbered diagonal elements associated with bold z for singularity. A variable is considered singular if the value of the corresponding diagonal element is less than epsilon times the original unpartialled corrected sum of squares of that variable. You can specify the singularity criterion epsilon by using the SINGULAR= option. For Pearson partial correlations, a controlling variable bold z is considered singular if the upper R squared for predicting this variable from the variables that are already partialled out exceeds 1 minus epsilon. When this happens, PROC CORR excludes the variable from the analysis. Similarly, a variable is considered singular if the upper R squared for predicting this variable from the controlling variables exceeds 1 minus epsilon. When this happens, its associated diagonal element and all higher-numbered elements in this row or column are set to zero.

After the Cholesky decomposition algorithm is applied to all rows associated with bold z, the resulting matrix has the form

StartLayout 1st Row  upper T equals Start 2 By 2 Matrix 1st Row 1st Column bold upper T Subscript z z Baseline 2nd Column bold upper T Subscript z y Baseline 2nd Row 1st Column 0 2nd Column bold upper S Subscript y y period z EndMatrix EndLayout

where upper T Subscript z z is an upper triangular matrix with upper T prime Subscript z z Baseline upper T Subscript z z Baseline equals upper S prime Subscript z z, upper T prime Subscript z z Baseline upper T Subscript z y Baseline equals upper S prime Subscript z y, and upper S Subscript y y period z Baseline equals upper S Subscript y y Baseline minus upper T prime Subscript z y Baseline upper T Subscript z y.

If upper S Subscript z z is positive definite, then upper T Subscript z y Baseline equals upper T prime Subscript z z Baseline Superscript negative 1 Baseline upper S prime Subscript z y and the partial CSSCP matrix upper S Subscript y y period z is identical to the matrix derived from the formula

upper S Subscript y y period z Baseline equals upper S Subscript y y Baseline minus upper S prime Subscript z y Baseline upper S Subscript z z Superscript prime negative 1 Baseline upper S Subscript z y

The partial variance-covariance matrix is calculated with the variance divisor (VARDEF= option). PROC CORR then uses the standard Pearson correlation formula on the partial variance-covariance matrix to calculate the Pearson partial correlation matrix.

When a correlation matrix is positive definite, the resulting partial correlation between variables x and y after adjusting for a single variable z is identical to that obtained from the first-order partial correlation formula

r Subscript x y period z Baseline equals StartFraction r Subscript x y Baseline minus r Subscript x z Baseline r Subscript y z Baseline Over StartRoot left-parenthesis 1 minus r Subscript x z Superscript 2 Baseline right-parenthesis left-parenthesis 1 minus r Subscript y z Superscript 2 Baseline right-parenthesis EndRoot EndFraction

where r Subscript x y, r Subscript x z, and r Subscript y z are the appropriate correlations.

The formula for higher-order partial correlations is a straightforward extension of the preceding first-order formula. For example, when the correlation matrix is positive definite, the partial correlation between x and y controlling for both z_1 and z_2 is identical to the second-order partial correlation formula

r Subscript x y period z 1 z 2 Baseline equals StartFraction r Subscript x y period z 1 Baseline minus r Subscript x z 2 period z 1 Baseline r Subscript y z 2 period z 1 Baseline Over StartRoot left-parenthesis 1 minus r Subscript x z 2 period z 1 Superscript 2 Baseline right-parenthesis left-parenthesis 1 minus r Subscript y z 2 period z 1 Superscript 2 Baseline right-parenthesis EndRoot EndFraction

where r Subscript x y period z 1, r Subscript x z 2 period z 1, and r Subscript y z 2 period z 1 are first-order partial correlations among variables x, y, and z_2 given z_1.

To derive the corresponding Spearman partial rank-order correlations and Kendall partial tau-b correlations, PROC CORR applies the Cholesky decomposition algorithm to the Spearman rank-order correlation matrix and Kendall’s tau-b correlation matrix and uses the correlation formula. That is, the Spearman partial correlation is equivalent to the Pearson correlation between the residuals of the linear regression of the ranks of the two variables on the ranks of the partialled variables. Thus, if a PARTIAL statement is specified with the CORR=SPEARMAN option, the residuals of the ranks of the two variables are displayed in the plot. The partial tau-b correlations range from –1 to 1. However, the sampling distribution of this partial tau-b is unknown; therefore, the probability values are not available.

Probability Values

Probability values for the Pearson and Spearman partial correlations are computed by treating

StartFraction left-parenthesis n minus k minus 2 right-parenthesis Superscript 1 slash 2 Baseline r Over left-parenthesis 1 minus r squared right-parenthesis Superscript 1 slash 2 Baseline EndFraction

as coming from a t distribution with left-parenthesis n minus k minus 2 right-parenthesis degrees of freedom, where r is the partial correlation and k is the number of variables being partialled out.

Last updated: November 06, 2022