pow(ssize)
pow()所属R语言包:ssize
Compute and plot power, reqired sample-size, or detectible effect
计算和图电源,reqired样本的大小,或可察觉的影响
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Compute and plot power, reqired sample-size, or detectible effect size for gene expression experiment
计算和图电源,reqired样本的大小,或可察觉的影响大小,基因表达的实验
用法----------Usage----------
pow(sd, n, delta, sig.level, alpha.correct = "Bonferonni")
power.plot(x, xlab = "Power", ylab = "Proportion of Genes with Power >= x",
marks = c(0.7, 0.8, 0.9), ...)
ssize(sd, delta, sig.level, power, alpha.correct = "Bonferonni")
ssize.plot(x, xlab = "Sample Size (per group)",
ylab = "Proportion of Genes Needing Sample Size <= n",
marks = c(2, 3, 4, 5, 6, 8, 10, 20), ...)
delta(sd, n, power, sig.level, alpha.correct = "Bonferonni")
delta.plot (x, xlab = "Fold Change",
ylab = "Proportion of Genes with Power >= 80% at Fold Change=delta",
marks = c(1.5, 2, 2.5, 3, 4, 6, 10), ...)
参数----------Arguments----------
参数:sd
Vector of standard deviations for control samples, *on the log2 scale*
矢量控制样本的标准偏差,*上的log2规模*
参数:n
Number of observations (per group)
的若干意见(每组)
参数:delta
Hypothetical True difference in expression, on the log2 scale.
假设真正的差异在语言表达上的log2规模。
参数:sig.level
Significance level (Type I error probability)
显着水平(I型错误的概率)
参数:power
Power
功率
参数:alpha.correct
Type of correction for multiple comparison. One of "Bonferonni" or "None".
多重比较校正类型。 “Bonferonni”或“无”。
参数:x
Vector of powers generated by pow
矢量pow产生的权力
参数:xlab, ylab
x and y axis labels
X和Y轴标签
参数:marks
Powers at which percent of genes achieving the specified cutoff is annotated on the plot.
权力在它的基因实现了指定的截止%的图上注明。
参数:...
Additional graphical parameters
额外的图形参数
Details
详情----------Details----------
The pow function computes power for each element of a gene expression experiment using an vector of estimated standard deviations. The power is computed separately for each gene, with an optional correction to the significance level for multiple comparison. The power.plot function generates a cumulative power plot illustrating the fraction and number of genes achieve a given power for the specified sample size, significance level, and delta.
pow函数计算一个基因的表达,使用矢量估计的标准偏差实验的每个元素的力量。电源分别计算每一个基因,一个可选的修正多重比较显着性水平。 power.plot函数生成一个累积的权力图,说明基因的数量和分数达到一个指定的样本量,显着性水平,并Delta赋予的权力。
Periods are printed for every 10 calculations so that the user can see that the computation is proceeding.
印为每10个计算周期,使用户可以看到,进行计算。
值----------Value----------
pow returns a vector containing the power for each standard deviation.
pow返回一个向量,包含每个标准偏差的权力。
注意----------Note----------
This code was intended to be used with data are on the log2 scale, in which case the delta can be set to becomes log2(fold-change).
此代码拟用于数据的log2规模,在这种情况下,Delta区域可以设置成为的log2(fold change)。
作者(S)----------Author(s)----------
Gregory R. Warnes <a href="mailto:greg@random-technologies-llc.com">greg@random-technologies-llc.com</a>
参考文献----------References----------
Warnes GR and Liu P, “Sample Size Selection for Microarray Experiments” submitted to Biometrics.
“Sample Size Selection for Microarray based Gene Expression Studies,” Talk, "2003 FDA/Industry Statistics Workshop: From Theory to Regulatory Acceptance", American Statistical Association, Bethesda, MD, Sept 18-19, 2003. http://www.warnes.net/Research/PresentationFolder/SampleSize.pdf
参见----------See Also----------
ssize, ssize.plot, delta, delta.plot
ssize,ssize.plot,delta,delta.plot
举例----------Examples----------
library(gdata) # for nobs()[NOBS()]
data(exp.sd)
# Histogram of the standard deviations[直方图的标准偏差]
hist(exp.sd,n=20, col="cyan", border="blue", main="",
xlab="Standard Deviation (for data on the log scale)")
dens <- density(exp.sd)
lines(dens$x, dens$y*par("usr")[4]/max(dens$y),col="red",lwd=2)
title("Histogram of Standard Deviations")
# 1) What is the power if using 6 patients 3 measurements assuming[1)什么是电源,如果使用6例,3个测量假设]
# Delta=1.0, Alpha=0.05 and Observed SDs?[Delta= 1.0,α= 0.05,观察SDS?]
#[]
n=6; fold.change=2.0; power=0.8; sig.level=0.05;
#[]
all.power <- pow(sd=exp.sd, n=n, delta=log2(fold.change),
sig.level=sig.level)
power.plot(all.power, lwd=2, col="blue")
xmax <- par("usr")[2]-0.05; ymax <- par("usr")[4]-0.05
legend(x=xmax, y=ymax,
legend= strsplit( paste("n=",n,",",
"fold change=",fold.change,",",
"alpha=", sig.level, ",",
"# genes=", nobs(sd), sep=''), "," )[[1]],[基因=“,NOBS(SD),SEP =)”,“)[1],]
xjust=1, yjust=1, cex=1.0)
title("Power to Detect 2-Fold Change")
# 2) What is necessary sample size for 80% power using 3 measurements/patient[2)什么是必要的样本量为80%的电力使用3测量/病人]
# assuming Delta=1.0, Alpha=0.05 and Observed SDs?[假设Delta= 1.0,α= 0.05,观察SDS?]
#[]
all.size <- ssize(sd=exp.sd, delta=log2(fold.change),
sig.level=sig.level, power=power)
ssize.plot(all.size, lwd=2, col="magenta", xlim=c(1,20))
xmax <- par("usr")[2]-1; ymin <- par("usr")[3] + 0.05
legend(x=xmax, y=ymin,
legend= strsplit( paste("fold change=",fold.change,",",
"alpha=", sig.level, ",",
"power=",power,",",
"# genes=", nobs(sd), sep=''), "," )[[1]],[基因=“,NOBS(SD),SEP =)”,“)[1],]
xjust=1, yjust=0, cex=1.0)
title("Sample Size to Detect 2-Fold Change")
# 3) What is necessary fold change to achieve 80% power using 3[3)什么是必要的fold change,实现80%的电力使用3]
# measurements/patient assuming n=6, Delta=1.0, Alpha=0.05 and Observed[测量/病人假设N = 6,Delta= 1.0,α= 0.05,并观察]
# SDs?[SDS?]
#[]
all.delta <- delta(sd=exp.sd, power=power, n=n,
sig.level=sig.level)
delta.plot(all.delta, lwd=2, col="magenta", xlim=c(1,10))
xmax <- par("usr")[2]-1; ymin <- par("usr")[3] + 0.05
legend(x=xmax, y=ymin,
legend= strsplit( paste("n=",n,",",
"alpha=", sig.level, ",",
"power=",power,",",
"# genes=", nobs(sd), sep=''), "," )[[1]],[基因=“,NOBS(SD),SEP =)”,“)[1],]
xjust=1, yjust=0, cex=1.0)
title("Fold Change to Achieve 80% Power")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|