BS.test(DEGraph)
BS.test()所属R语言包:DEGraph
Performs the test of Bai and Saranadasa (1996)
白族Saranadasa(1996)执行的测试
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Performs the test of Bai and Saranadasa (1996).
执行测试白族Saranadasa(1996)。
用法----------Usage----------
BS.test(X1, X2, na.rm=FALSE)
参数----------Arguments----------
参数:X1
A n1 x p matrix, observed data for class 1: p variables, n1 observations.
一个N1 XP matrix,观察到1级的数据:P变量,N1的意见。
参数:X2
A n2 x p matrix, observed data for class 2: p variables, n2 observations.
一个N2 XP matrix,观察到的数据为2级:P变量,N2意见。
参数:na.rm
A logical value indicating whether variables with NA in at least one of the n1 + n2 observations should be discarder before the test is performed.
一个logical值,指示是否使用变量NA至少在一个N1 + N2意见应该铳前进行测试。
值----------Value----------
A list with class "htest" containing the following components:
一个list类“htest”包含以下组件:
statistic A numeric value, the test statistic.
统计一个numeric值,检验统计量。
p.value A numeric value, the corresponding p-value.
p.value一个numeric值,相应的p值。
作者(S)----------Author(s)----------
Laurent Jacob, Pierre Neuvial and Sandrine Dudoit
参见----------See Also----------
AN.test() graph.T2.test() hyper.test()
AN.test()graph.T2.test()hyper.test()
举例----------Examples----------
library("KEGGgraph")
## library("NCIgraph")[#库(“NCIgraph”)]
library("rrcov")
data("Loi2008_DEGraphVignette")
exprData <- exprLoi2008
classData <- classLoi2008
rn <- rownames(exprData)
## Retrieve expression levels data for genes from one KEGG pathway[#从一个KEGG通路的基因表达水平的数据检索]
gr <- grListKEGG[[1]]
gids <- translateKEGGID2GeneID(nodes(gr))
mm <- match(gids, rownames(exprData))
## Keep genes from the graph that are present in the expression data set[#远离基因图,是在表达数据集]
idxs <- which(!is.na(mm))
gr <- subGraph(nodes(gr)[idxs], gr)
idxs <- which(is.na(mm))
if(length(idxs)) {
print("Gene ID not found in expression data: ")
str(gids[idxs])
}
dat <- exprData[na.omit(mm), ]
str(dat)
X1 <- t(dat[, classData==0])
X2 <- t(dat[, classData==1])
## DEGraph T2 test[#DEGraph T2检验]
res <- testOneGraph(gr, exprData, classData, verbose=TRUE, prop=0.2)
## T2 test (Hotelling)[#T2检验(霍特林)]
rT2 <- T2.test(X1, X2)
str(rT2)
## Adaptive Neyman test[#自适应奈曼测试]
rAN <- AN.test(X1, X2, na.rm=TRUE)
str(rAN)
## Adaptive Neyman test from Fan and Lin (1998)[#自适应奈曼测试范和林(1998)]
rAN <- AN.test(X1, X2, na.rm=TRUE)
str(rAN)
## Test from Bai and Saranadasa (1996)[#测试从白和Saranadasa(1996)]
rBS <- BS.test(X1, X2, na.rm=TRUE)
str(rBS)
## Hypergeometric test[#超几何测试]
pValues <- apply(exprData, 1, FUN=function(x) {
tt <- t.test(x[classData==0], x[classData==1])
tt$p.value
})
str(pValues)
names(pValues) <- rownames(exprData)
rHyper <- hyper.test(pValues, gids, thr=0.01)
str(rHyper)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|