Learn R Programming

StatDA (version 1.7.11)

cor.sign: Correlation Matrix

Description

Computes correlation matrix of x with method "pearson", "kendall" or "spearman". This function also prints the matrix with the significance levels.

Usage

cor.sign(x, method = c("pearson", "kendall", "spearman"))

Value

cor

Correlation matrix

p.value

p-value of the test statistic

Arguments

x

the data

method

the method used

Details

This function estimate the association between paired samples an compute a test of the value being zero. All measures of association are in the range [-1,1] with 0 indicating no association.

References

C. Reimann, P. Filzmoser, R.G. Garrett, and R. Dutter: Statistical Data Analysis Explained. Applied Environmental Statistics with R. John Wiley and Sons, Chichester, 2008.

See Also

Examples

Run this code
data(chorizon)
x=chorizon[,c("Ca","Cu","Mg","Na","P","Sr","Zn")]

cor.sign(log10(x),method="spearman")

Run the code above in your browser using DataLab