| Asymptotic p-value for many correlation coefficients | R Documentation | 
Asymptotic p-value for many correlation coefficients.
correls(y, x, type = "pearson", rho = 0, alpha = 0.05)
| y | A numerical vector. | 
| x | A numerical vector. | 
| type | The type of correlation coefficient to compute, "pearson" or "spearman". | 
| rho | The hypothesized value of the true partial correlation. | 
| alpha | The significance level. | 
Suppose you have a (dependent) variable Y and a matrix of p variables \bf X and you want to get all the correlations between Y and X_i for i=1,\ldots,p. if you type cor(y, x) in you will get a vector of the correlations. What I offer here is confidence interval for each of the correlations, the test statistic and the p-values for the hypothesis that each of them is equal to some value \rho. The p-values and test statistics are useful for meta-analysis for example, combination of the p-values in one or even to see the false discovery rate (see the package fdrtool by Korbinian Strimmer).
A matrix with 5 columns, the correlations, the test statistics, their associated p-values and the relevant (1-\alpha)\% confidence intervals.
Michail Tsagris
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
 correl, permcorrels
y <- rnorm(40)
x <- matrix(rnorm(40 * 1000), ncol = 1000)
a <- correls(y, x )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.