adjustScvForBias(DESeq)
adjustScvForBias()所属R语言包:DESeq
Adjust an SCV value for the bias arising when it is calculated from unbiased estimates of mean and variance.
调整工程兵值产生偏差时,它是从均值和方差的无偏估计计算。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Assume that a small sample of i.i.d. random variables from a negative binomial distribution is given, and you have obtained unbiased estimates of mean and raw variance. Then, a new bias is introduced when the squared coefficient of variation (SCV, a.k.a. dispersion) is calculated from these unbiased estimates by dividing the raw variance by the square of the mean. This bias can be calculated by numerical simulation and a pre-calculated adjustment table (or rather a fit through tabulated values) is supplied with the package. The present function uses this to remove the bias from a raw SCV estimate.
假设,i.i.d.小的样本从负二项分布的随机变量,并给出你所获得的平均原料及方差的无偏估计。然后,一个新的偏差平方的变异系数(SCV,又名色散)时介绍,从这些计算除以平均广场的原料方差的无偏估计。这种偏见可以通过数值模拟计算和包提供一个预先计算的调整表(或相当适合通过表值)。本功能使用,从原始的工程兵估计的偏差。
This function is used internally in nbinomTest. You will rarely need to call it directly.
nbinomTest这个函数内部使用。你很少会需要直接调用它。
用法----------Usage----------
adjustScvForBias(scv, nsamples)
参数----------Arguments----------
参数:scv
An estimate for the raw squared coefficient of variation (SCV) for negative binomially distributed data, which has been obtained by dividing an unbiased estimate of the raw variance by the square of an unbiased estimate of the mean.
原料平方(SCV),变异系数为负binomially分布式数据,已获得原料方差的无偏估计的无偏估计的平均平方除以估计。
参数:nsamples
The size of the sample used in the estimation.
在估算中使用的样本大小。
值----------Value----------
an unbiased estimate of the raw SCV
原工程兵的无偏估计
作者(S)----------Author(s)----------
Simon Anders
举例----------Examples----------
true_mean <- 100
true_scv <- .1
nsamples <- 3
res <- replicate( 1000, {
mySample <- rnbinom( nsamples, mu=true_mean, size=1/true_scv )
mu_est <- mean( mySample )
raw_var_est <- var( mySample ) - mean( mySample )
raw_scv_est <- raw_var_est / mu_est^2
unbiased_raw_scv_est <- adjustScvForBias( raw_scv_est, 4 )
c( raw_scv_est = raw_scv_est, unbiased_raw_scv_est = unbiased_raw_scv_est ) } )
rowMeans( res )
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|