row.pearson {HybridMTest} | R Documentation |
For each row of a data matrix Y, compute the Pearson correlation with the variable x.
row.pearson(Y, x)
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 |
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 |
Stan Pounds <stanley.pounds@stjude.org>; Demba Fofana <demba.fofana@stjude.org>
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.
####################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])