MatCor: Calculate correlation between two matrices

Description Usage Arguments Value Author(s)

View source: R/MatCor.R

Description

This funciton calculate correlation between 2 matrices. The 2 matrices must have samples (observations) on columns, and variables to compute correltaion on rows. The 2 matrices must have same number of columns. Methods supported are pearson, spearman, kendall, and linear model with more complex design.

Usage

1
MatCor(X, Y, method, adjust.method = "BH", ...)

Arguments

X

numaric matrix of data values.

Y

numeric matrix of data values. Must have same number of columns as X.

method

character value indicating the method to use. Must be one of "pearson", "spearman", "kendall", or "lm".

adjust.method

character value indicating the method to use for p value adjustement. See p.adjust.

...

other arguments. If either of "person", "kendal", or "spearman" is specified, any other arguments in the cor.test function can be used. If "lm" is specified, a design matrix must be passed. The design matrix can be built using the model.matrix function.

Value

A list of data frames. The length of the list equals to the number of rows of X, and the number of rows of each data fram equals to the number of rows of Y. Each data frame has 4 columns.

stat

the value of the test statistic.

estimate

the estimated measure of association. Corresponds to the "r" for pearson, "rho" for spearman, "tau" for kendal, and coefficient for lm

pval

the p-value of the test.

padj

the p-value of the test after multiple test adjustment.

Author(s)

Chenghao Zhu


zhuchcn/MatCorR documentation built on Nov. 5, 2019, 1:27 p.m.