# Pearson correlation coefficent in slices of tissues

I m a PhD student in the biomedical field. I have an issue about the use of Pearson correlation coefficent (PCC) in the context of my experimental procedure. I have several slices of tissue where I measured the content, the localization and the intensity of two proteins. So I have obtained two images of the same tissues but on two different colour channels; the first is green and is related to the protein x and the second is the red channel and it is related to the protein y. Well, in order to evaluate the co-localization of the two proteins in the same tissue I used the PCC between the green and red channels of the images (considering the pixels of the image as the bins for the analysis). This shows, how much the two proteins co-localizate in the same slice of tissue. I repeated the measurements on three similar tissues for 4 groups. So, I have 4x3 PCC. The question is: to evaluate the difference among the groups, is it correct to take a mean and a SEM of each of the 4 groups and to use a t-test statistics (if the prerequisites for t-testing are met) to assess if there is a significant variation of PCC and thus of the co-localization of the two protein, among the 4 groups? Is this correct for evaluating three or more PCC? Could it be better to do a regression of the points?

This below is an example to explain the starting dataset:

       r    pixel       var_r tissue timepoint(hours)
1  -0.06 480.4290 0.002070824 liver  0
2   0.19 545.2076 0.001707259 liver  0
3  -0.01 391.8333 0.002558124 liver  0
4   0.29 582.2123 0.001443316 liver  20
5   0.46 436.5935 0.001426960 liver  20
6   0.29 543.9229 0.001545105 liver  20
7   0.14 638.7524 0.001507143 liver  40
8   0.44 428.2363 0.001522064 liver  40
9   0.39 332.3729 0.002169563 liver  40
10  0.40 481.4496 0.001468625 liver  75

• Based on your description it sounds as though you have a nested data structure, where your individual pixels are nested within tissue. It boils down to an issue of non-independence as it may not be defensible to assume that the error terms from pixel to pixel in a given subject's tissue are independent (which is an assumption of Pearson's correlation as well as OLS regression). You may want to consider a mixed effects model that can account for your nested data structure. Commented Jul 4, 2017 at 20:31
• Thanks for your answer. In bibliography pearson s and mander s coefficent have been already used for this problem. The difficult is when you want to evaluate the variation of the pcc across a condition (time or drug treatment) Commented Jul 4, 2017 at 21:24
• This now sounds sort of like a meta-analytic problem, where you want to take several effect sizes (i.e., Pearson's correlations) that have already been reported, and determine whether other factors (i.e., treatment or time) moderate the size of Pearson's r. Is that sort of on target? Commented Jul 4, 2017 at 21:34
• Yes! You went exactly to the point of the problem Commented Jul 4, 2017 at 21:41

I am actually in the midst of performing my own meta-analysis on a separate topic. However, the problem is generally similar in that I want to aggregate associations across a number of reports. For the sake of simplifying this example, I am going to try to provide some additional context to this problem.

Let's say you have 3 different tissues with ~25 correlations each for each pair of proteins you are interested in. So that is a total of 75 effect sizes. And for simplicity's sake, let's say that you are interested in just evaluating a single moderator for the time being (drug treatment A vs. drug treatment B). You would also need sample size (number of pixels that went into each correlation) and the variance term for each effect (which can be calculated using the formula here). Armed with this information you can get a data set that looks something like this (I simulated this data for illustration purposes):

> head(DF, n=10)
r    pixel       var_r drug tissue
1  -0.06 480.4290 0.002070824    B kidney
2   0.19 545.2076 0.001707259    B kidney
3  -0.01 391.8333 0.002558124    B  liver
4   0.29 582.2123 0.001443316    A   lung
5   0.46 436.5935 0.001426960    B  liver
6   0.29 543.9229 0.001545105    A kidney
7   0.14 638.7524 0.001507143    B   lung
8   0.44 428.2363 0.001522064    A   lung
9   0.39 332.3729 0.002169563    A   lung
10  0.40 481.4496 0.001468625    A  liver


Next, I need to add a few binary predictors so I can include them in the final model.

#Need to recode predictors - so that they are included as binary predictors...
DF$drug_bin<-ifelse(DF$drug=="A", 1, 0)
DF$liver<-ifelse(DF$tissue=="liver", 1, 0)
DF$kidney<-ifelse(DF$tissue=="kidney",1,0)
DF$lung<-ifelse(DF$tissue=="lung", 1, 0)


The resulting dataframe looks something like this now:

> head(DF, n=10)
r    pixel       var_r drug tissue drug_bin liver lung kidney
1  -0.06 480.4290 0.002070824    B kidney        0     0    0      1
2   0.19 545.2076 0.001707259    B kidney        0     0    0      1
3  -0.01 391.8333 0.002558124    B  liver        0     1    0      0
4   0.29 582.2123 0.001443316    A   lung        1     0    1      0
5   0.46 436.5935 0.001426960    B  liver        0     1    0      0
6   0.29 543.9229 0.001545105    A kidney        1     0    0      1
7   0.14 638.7524 0.001507143    B   lung        0     0    1      0
8   0.44 428.2363 0.001522064    A   lung        1     0    1      0
9   0.39 332.3729 0.002169563    A   lung        1     0    1      0
10  0.40 481.4496 0.001468625    A  liver        1     1    0      0


Now using the metaSEM library in R, it is pretty straightfoward to perform this analysis. The model will address whether the correlation between the two proteins differs as a function of drug treatment, controlling for tissue type (not sure if that is a sufficient simplification of one of your aims, but let's roll with it for illustrative purposes)

> fit<-meta(y=r, v=var_r, x=cbind(drug_bin, liver, kidney), data = DF)
> summary(fit)

Call:
meta(y = r, v = var_r, x = cbind(drug_bin, liver, kidney), data = DF)

95% confidence intervals: z statistic approximation
Coefficients:
Estimate  Std.Error     lbound     ubound z value  Pr(>|z|)
Intercept1  0.1291222  0.0383024  0.0540509  0.2041935  3.3711 0.0007486 ***
Slope1_1    0.1127022  0.0389916  0.0362800  0.1891243  2.8904 0.0038473 **
Slope1_2    0.1060882  0.0454696  0.0169693  0.1952070  2.3332 0.0196395 *
Slope1_3   -0.0650920  0.0480204 -0.1592103  0.0290263 -1.3555 0.1752565
Tau2_1_1    0.0258275  0.0044716  0.0170634  0.0345917  5.7759 7.652e-09 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Q statistic on the homogeneity of effect sizes: 1699.04
Degrees of freedom of the Q statistic: 74
P value of the Q statistic: 0

Explained variances (R2):
y1
Tau2 (no predictor)    0.0342
Tau2 (with predictors) 0.0258
R2                     0.2444

Number of studies (or clusters): 75
Number of observed statistics: 75
Number of estimated parameters: 5
Degrees of freedom: 70
-2 log likelihood: -56.98144
OpenMx status1: 0 ("0" or "1": The optimization is considered fine.
Other values may indicate problems.)


In this example, we are primarily concerned with the intercept, which is the average correlation between the two proteins when taking drug B (B was coded as 0 and A as 1 in the syntax above), and Slope_1, which is the difference in the average correlation between between drug A and drug B users. This model would suggest that on average, the correlation is higher for drug A users, controlling for tissue type.

This is a more simplified version of what you were interested in, but hopefully it helps generate some ideas about approaches you could take.

• Wow your wonderful example is really similar to that one I would like to describe in my case. The difference is only at level of the drug treatment. In my case I haven't a drug treatment but I would like to evaluate the variation of colocalization in the liver across the time. Do you think that is matematically incorrect to mediate two or more PCC and to evaluate the variation at each time-point with a t-test? I will post a code to better describe my situation in a dataframe pandas. Commented Jul 5, 2017 at 9:17
• You may instead then want to calculate the difference between two dependent non-overlapping correlations and the difference's variance based off of the formulas presented here. Overall the article is fairly useful, but pay special attention to the formulas that extend from page 409 to 410. Then instead of r and its variance you would input change in r and the variance for the change in r into the data sets above. Commented Jul 5, 2017 at 11:58
• I understand, but I can't open the link that you posted above. It's needed the authentication. Commented Jul 5, 2017 at 15:02
• Here is the link in its complete form: psycnet.apa.org/journals/met/12/4/399 Commented Jul 5, 2017 at 15:06
• It's a very interesting article! But, what do you think in regard the projection of r pearson's coefficient into a z-scale? It's seems to be quite similar to those proposed in the article, right? Commented Jul 5, 2017 at 15:55