row.pearson: Compute the Pearson correlation of a variable x with many...

Description Usage Arguments Value Author(s) References Examples

View source: R/row.pearson.R

Description

For each row of a data matrix Y, compute the Pearson correlation with the variable x.

Usage

1

Arguments

Y

A data matrix with rows for variables and columns for subjects.

x

a vector with the variable to be correlated with each variable of Y

Value

A data.frame with three columns:

stat

a vector with the Pearson correlation for each row of Y

pval

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

ebp

a vector with the empirical Bayesian probability that the correlation is zero for each row of Y

Author(s)

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

References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  

####################Correlation Study#####################
# load data
data(correlation.data)
# Read the expression values  
Y<-exprs(correlation.data)
# Read the phenotype
x<-pData(correlation.data)
x[,1]
#Pearson Test
row.pearson(Y,x[,1])

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