row.pearson {HybridMTest}R Documentation

Compute the Pearson correlation of a variable x with many variables in a matrix Y

Description

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

Usage

row.pearson(Y, x)

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

  

####################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])

[Package HybridMTest version 1.37.0 Index]