The coefficient of alienation, and its relation with joint variance through correlation are available in Guilford (1973, pp. 344–345). Computation Using linear regression A simple way to compute the sample partial correlation for some data is to solve the two associated linear regression problems and calculate the correlation between the residuals. Let X and Y be random variables taking real values, and let Z be the n-dimensional vector-valued random variable. Let xi, yi and zi denote the ith of i.i.d. observations from some joint probability distribution over real random variables X, Y, and Z, with zi having been augmented with a 1 to allow for a constant term in the regression. Solving the linear regression problem amounts to finding (n+1)-dimensional regression coefficient vectors and such that where is the number of observations, and is the scalar product between the vectors and . The residuals are then and the sample partial correlation is then given by the usual formula for sample correlation, but between these new derived values: In the first expression the three terms after minus signs all equal 0 since each contains the sum of residuals from an ordinary least squares regression. Example Consider the following data on three variables, X, Y, and Z: Computing the Pearson correlation coefficient between variables X and Y results in approximately 0.970, while computing the partial correlation between X and Y, using the formula given above, gives a partial correlation of 0.919. The computations were done using R with the following code. > X <- c(2,4,15,20) > Y <- c(1,2,3,4) > Z <- c(0,0,1,1) > mm1 <- lm(X~Z) > res1 <- mm1$residuals > mm2 <- lm(Y~Z) > res2 <- mm2$residuals > cor(res1,res2) [1] 0.919145 > cor(X,Y) [1] 0.9695016 > generalCorr::parcorMany(cbind(X,Y,Z)) nami namj partij partji rijMrji [1,] "X" "Y" "0.8844" "1" "-0.1156" [2,] "X" "Z" "0.1581" "1" "-0.8419" The lower part of the above code reports generalized nonlinear partial correlation coefficient between X and Y after removing the nonlinear effect of Z to be 0.8844. Also, the generalized partial correlation coefficient between X and Z after removing the nonlinear effect of Y to be 0.1581. See the R package `generalCorr' and its vignettes for details. Simulation and other details are in Vinod (2017) "Generalized correlation and kernel causality with applications in development economics," Communications in Statistics - Simulation and Computation, vol. 46, [4513, 4534], available online: 29 Dec 2015, URL https://doi.org/10.1080/03610918.2015.1122048. Using recursive formula