1

I have a correlation between two dimensions $A$ and $B$, each dimension has 1 variable $i$ with $j$ samples. $A_i$ and $B_i$ (Let's call it $r_{Di}$). I also have a correlation of $A_i$ with another variable $C_i$ (Let's say $r_{Ei}$). For each correlation I calculate the $p$-value. For these 2 correlations, I do the correlation between ($r_D$) and ($r_E$) for all the $i$ variables. As I have the $p$-values of each correlation of $A$ with $B$ and each correlation of $A$ with $C$, can I use these $p$-values to do a weighted correlation for the correlation between $r_D$ and $r_E$? If I can use the $p$-values for this correlation how do I combine them?

I could find a question (When combining p-values, why not just averaging?) which seems to imply that there are further uses of $p$-values. But the aim of such methods seems to combine different independent studies and not from the same study.

To calculate those $p$-values are calculated with this function in r package WGCNA, whose descriptions says "Calculates Student asymptotic p-value for given correlations":

function (cor, nSamples) {
    T = sqrt(nSamples - 2) * cor/sqrt(1 - cor^2)
    2 * pt(abs(T), nSamples - 2, lower.tail = FALSE)
}
llrs
  • 525
  • 5
  • 25
  • What for? How exactly do you want to weight correlation by p-value? – Tim Nov 18 '16 at 09:52
  • see http://stats.stackexchange.com/questions/164181/family-wise-error-boundary-does-re-using-data-sets-on-different-studies-of-inde/164232#164232 –  Nov 18 '16 at 10:20
  • @Tim Because the p-values indicates how much I trust a value, so for further correlations I hope that this information can be incorporated somehow. In R the package corr: `w.cor(AB, AC, w = ?)` – llrs Nov 18 '16 at 10:34
  • @Llopis there is no such package on CRAN so I'm not sure what do you refer to. I *guess* that you mean [weighted correlation](http://stats.stackexchange.com/questions/221246/such-thing-as-a-weighted-correlation) but if so, then the weights are per *observation*, not per variable, and certainly nor per pairs of variables. – Tim Nov 18 '16 at 10:42
  • Oh, I mixed names it is from the boot package. Yes, I mean weighted correlation.So I can't do the correlation between ABi ABj with ACi ACj using for each pair?, The corr function of the boot package expect this weight for each pair – llrs Nov 18 '16 at 11:18
  • Can you look at your question again and clarify it in the light of the comments by editing it? At the moment it does not seem clear to us whether you want to combine the p-values or combine the correlations in some way. – mdewey Nov 18 '16 at 11:37
  • I want to use the p-values combined to do a weighted correlation on previous correlations. – llrs Nov 18 '16 at 11:46
  • Could you explain what you mean by the "correlation between $(A-B)$ and $(A-C)$"? Are you actually subtracting values or are you trying to refer to something else? It certainly reads like subtraction but I can't quite believe you mean that, since there doesn't seem to be any reason to suppose the correlations of the differences have any mathematical connection with the original correlations. – whuber Nov 18 '16 at 14:39
  • I think I have clarified it, I am using the correlation between A and B to correlate it with the result of the correlation between A and C. So like nested correlations. See edit – llrs Nov 18 '16 at 15:13
  • What does the index "$i$" refer to, then? Although have included it, your description indicates there is exactly *one* correlation between $A$ and $B$ and exactly *one* correlation between $A$ and $C$. You cannot correlate two numbers! – whuber Nov 18 '16 at 15:14
  • That's what I was editing now :D, I hope it is clearer now. – llrs Nov 18 '16 at 15:21
  • Yes it is, thank you. Now that we see you are correlating two sets of statistics (namely, the correlation coefficients) it makes sense to follow up with the next question: exactly what hypotheses do these p-values correspond to and exactly how were they calculated? In general you cannot do anything at all relevant with those p-values, but if you could supply this information it might be possible to back-calculate the *standard errors* of the correlation coefficients and then you would have something to work with. – whuber Nov 18 '16 at 15:23
  • I could manage to calculate the standard error. I am using R so I added the function I use to calculate the p-value. The null hypotheses is that there is a normal distribution, if I understood correctly the vignette. – llrs Nov 18 '16 at 15:34

1 Answers1

1

No, you can't do that. The flaw is that p-values do not "indicate how much I trust a value". Rather, p-values can be considered a measure of evidence against the null value. Those aren't the same thing (although they do sound similar to people at first). The confidence interval could be considered a measure of how much your trust the (point) value of your correlation, but I would not use it in the way you are thinking.

I wouldn't bother trying to use a weighted correlation at all in your circumstance. Moreover, knowing the correlations between A and B, and between A and C, does very little to constrain the possible correlation value between B and C (see: If A and B are correlated with C, why are A and B not necessarily correlated?).

gung - Reinstate Monica
  • 132,789
  • 81
  • 357
  • 650
  • I am doing the correlation between $A_i$ and $B_i$ (let's call it $r_{Di}$) and between $A_i$ and $C_i$ (let's call it $r_{Ei}$) and I want to use the p-values of those correlations to the correlation between $r_E$ and $r_D$. In this sense the evidence against the null value wouldn't be useful? – llrs Nov 18 '16 at 15:08
  • 1
    I'm not sure I follow this, @Llopis. You've computed $r_{AB}$ & $r_{AC}$, & now you want to compute $r_{(A-B)(A-C)}$? That doesn't make sense. (1) you don't do that--that's a spurious correlation; & (2) the p-values wouldn't be relevant for that even if it did make any sense. Why do you want to do that? What is your real goal here? It might help if you provided more information about your situation, your study, your data, & what you ultimately want to know. – gung - Reinstate Monica Nov 18 '16 at 15:16