New function to compute pairwise marginal joint shift correlations between nodes