spearman.rstat {PROMISE} | R Documentation |
A function to calculate Spearman rank correlation of each gene in an array data with a continuous variable
spearman.rstat(Y, x, strat = NULL)
Y |
a numeric data frame. Each row gives values of one genomic variable. |
x |
a vector of continuous variable. |
strat |
a vector of stratum to calculate stratified correlation statistics, default = NULL. |
Return a vector of Spearman rank correlation statistics.
Stan Pounds stanley.pounds@stjude.org; Xueyuan Cao xueyuan.cao@stjude.org
Spearman C. (1904) The proof and measurement of association between two things. Amer. J. Psychol. 15: 72-101
## load sampExprSet. data(sampExprSet) ## extract expression matrix from sampExprSet Y <- exprs(sampExprSet) ## extract end point data from sampExprSet x <- pData(phenoData(sampExprSet))$drugLevel strat <- pData(phenoData(sampExprSet))$strat ## Calculte Spearman correlation statistics test <- spearman.rstat(Y, x, strat = strat)