Description Usage Arguments Details Value Note Author(s) References See Also Examples
Computes the pairwise correlations for all valid cases (!NA) in a data frame and find the probabilities for each combination. This function parses the correlations below the diagonal and the significance probabilities above it.
1 |
x |
A data object. |
df |
an optional value for degrees of freedom. The default assumes you have a common degrees of freedom (n-2) for all correlations in the table. |
The connexion between correlation and t-statistics is known to be t = \frac{r √{(n-2)}} {√{(1-r^2)}}. Or then, F = t^2 = r^2 * (n - 2)/(1 - r^2) ~ F(1, n-2). By solving this, it is possible to find the probabilities.
A data frame object with the Pearson's product-moment coefficient and its probabilitie. The first diagonal display the correlations, while the probabilities are shown in the second uppper diagonal.
You can print the whole matrix using cor(t(x))
Daniel Marcelino
Aldrich, John (1995) Correlations Genuine and Spurious in Pearson and Yule. Statistical Science, 10(4), 364–376.
1 2 3 4 5 6 7 8 9 10 11 12 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.