Asymptotic p-value for many correlation coefficients {corrfuns}R Documentation

Asymptotic p-value for many correlation coefficients

Description

Asymptotic p-value for many correlation coefficients.

Usage

correls(y, x, type = "pearson", rho = 0, alpha = 0.05)

Arguments

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.

Details

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).

Value

A matrix with 5 columns, the correlations, the test statistics, their associated p-values and the relevant (1-\alpha)\% confidence intervals.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

See Also

correl, permcorrels

Examples

y <- rnorm(40)
x <- matrix(rnorm(40 * 1000), ncol = 1000)
a <- correls(y, x )

[Package corrfuns version 1.0 Index]