row.spearman: Compute Spearmans rank-based correlation of many variables...

Description Usage Arguments Value Author(s) References Examples

View source: R/row.spearman.R

Description

For each row of the data matrix Y, compute its Spearman correlation with x.

Usage

1

Arguments

Y

a data matrix with rows for variables and columns for subjects

x

a vector of the variable to be associated with each row of Y

Value

A data.frame with three components:

stat

a vector with the Spearman correlation for each row of Y

pval

a vector with the p-value for each row of Y

ebp

a vector with the estimated empirical Bayes probability of zero correlation for each row of Y

Author(s)

Stan Pounds <stanley.pounds@stjude.org>; Demba Fofana <demba.fofana@stjude.org>

References

Spearman, C. (1904) The proof and measurement of association between two things. Amer. J. Psychol. 15:72-101.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  
####################Correlation Study#####################
# load data
data(correlation.data)
# Read the expression values  
Y<-exprs(correlation.data)
# Read the phenotype
x<-pData(correlation.data)
x[,1]
#Spearman Test
row.spearman(Y,x[,1])

HybridMTest documentation built on Nov. 8, 2020, 8:29 p.m.