Learn R Programming

st (version 1.2.7)

cst.stat: Correlation-Shared t-Statistic

Description

shrinkcat.stat and shrinkcat.fun compute the ``correlation-shared'' t-statistic of Tibshirani and Wassermann (2006).

Usage

cst.stat(X, L, verbose=TRUE)
cst.fun(L, verbose=TRUE)

Arguments

X

data matrix. Note that the columns correspond to variables (``genes'') and the rows to samples.

L

vector with class labels for the two groups.

verbose

print out some (more or less useful) information during computation.

Value

cst.stat returns a vector containing correlation-shared t-statistic for each variable/gene.

The corresponding cst.fun functions return a function that computes the correlation-shared t-statistic when applied to a data matrix (this is very useful for simulations).

Details

The correlation-shared t-statistic for a gene is computed as the average of t-scores correlated with that gene. For mathematical details see Tibshirani and Wasserman (2006).

References

Tibshirani, R., and L. Wasserman. 2006. Correlation-sharing for detection of differential gene expression. See https://arxiv.org/abs/math/0608061 for publication details.

See Also

shrinkcat.stat, lait.stat.

Examples

Run this code
# NOT RUN {
# load st library 
library("st")

# prostate data set
data(singh2002)
X = singh2002$x
L = singh2002$y

dim(X)      # 102 6033 
length(L)   # 102

# correlation shared t statistic
# }
# NOT RUN {
score = cst.stat(X, L)
idx = order(abs(score), decreasing=TRUE)
idx[1:10]
# [1]  610 1720  364  332  914 3940 4546 1068  579 4331
# }
# NOT RUN {
# compared with:

# Student t statistic
score = studentt.stat(X, L)
idx = order(abs(score), decreasing=TRUE)
idx[1:10]
# [1]  610 1720  364  332  914 3940 4546 1068  579 4331


# for the same example using the shrinkage cat score see shrinkcat.stat() 

# }

Run the code above in your browser using DataLab