R 如何定义eBayes函数中的自由度

R 如何定义eBayes函数中的自由度,r,analysis,bioconductor,limma,R,Analysis,Bioconductor,Limma,我正在使用Bioconductorlimma软件包。我想在微阵列分析的eBayes函数中定义自由度。如何更改其中的默认自由度?请参见下面的代码: fit2 <- eBayes(fit2, 0.01) # source("https://bioconductor.org/biocLite.R") # biocLite("limma", suppressUpdates = TRUE) library(limma) set.seed(123) sigma2 <- 0.05 / rchi

我正在使用Bioconductor
limma
软件包。我想在微阵列分析的
eBayes
函数中定义自由度。如何更改其中的默认自由度?请参见下面的代码:

fit2 <- eBayes(fit2, 0.01)
# source("https://bioconductor.org/biocLite.R")
# biocLite("limma", suppressUpdates = TRUE)

library(limma)
set.seed(123)
sigma2 <- 0.05 / rchisq(100, df = 10) * 10
y <- matrix(rnorm(100 * 6, sd = sqrt(sigma2)), 100, 6)
design <- cbind(Intercept=1, Group=c(0, 0, 0, 1, 1, 1))
y[1, 4:6] <- y[1, 4:6] + 1
fit <- lmFit(y, design)

fit$df.residual
# [1] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
# [63] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4

fit$df.residual <- rep(3, 100)

#  Moderated t-statistic
fit <- eBayes(fit, .01)

fit2然而,建模后更改自由度的原因尚不清楚,因为自由度表征了输入数据中变量和观察值的数量。您可以更改
MArrayLM
对象的自由度,该对象是
eBayes
函数的参数。 请参阅下面的代码:

fit2 <- eBayes(fit2, 0.01)
# source("https://bioconductor.org/biocLite.R")
# biocLite("limma", suppressUpdates = TRUE)

library(limma)
set.seed(123)
sigma2 <- 0.05 / rchisq(100, df = 10) * 10
y <- matrix(rnorm(100 * 6, sd = sqrt(sigma2)), 100, 6)
design <- cbind(Intercept=1, Group=c(0, 0, 0, 1, 1, 1))
y[1, 4:6] <- y[1, 4:6] + 1
fit <- lmFit(y, design)

fit$df.residual
# [1] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
# [63] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4

fit$df.residual <- rep(3, 100)

#  Moderated t-statistic
fit <- eBayes(fit, .01)
#源代码(“https://bioconductor.org/biocLite.R")
#biocLite(“limma”,suppressUpdates=TRUE)
图书馆(林玛)
种子集(123)

sigma2您能否在问题中提供所需的行为、特定的问题或错误以及在问题本身中重现这些问题所需的最短代码。没有明确问题陈述的问题对其他读者没有用处。参见:“《生物信息学》中的特定问题可能会在