poolVar(limma)
poolVar()所属R语言包:limma
Pool Sample Variances with Unequal Variances
池样本方差与异方差
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Compute the Satterthwaite (1946) approximation to the distribution of a weighted sum of sample variances.
计算的Satterthwaite(1946年)的近似分布的样本方差的加权总和。
用法----------Usage----------
poolVar(var, df=n-1, multiplier=1/n, n)
参数----------Arguments----------
参数:var
numeric vector of independent sample variances
数字矢量独立样本方差
参数:df
numeric vector of degrees of freedom for the sample variances
自由度为样本方差的数字向量
参数:multiplier
numeric vector giving multipliers for the sample variances
数字矢量给予乘数为样本方差
参数:n
numeric vector of sample sizes
样本大小的数字向量
Details
详情----------Details----------
The sample variances var are assumed to follow scaled chi-square distributions. A scaled chi-square approximation is found for the distribution of sum(multiplier * var) by equating first and second moments. On output the sum to be approximated is equal to multiplier * var which follows approximately a scaled chisquare distribution on df degrees of freedom. The approximation was proposed by Satterthwaite (1946).
样本方差var假设按照比例卡方分布。发现一个比例卡方近似为sum(multiplier * var)分布等同第一和第二的时刻。在输出近似的总和等于multiplier * var遵循一个规模约上df自由度的卡方分布。 Satterthwaite(1946)提出的近似。
If there are only two groups and the degrees of freedom are one less than the sample sizes then this gives the denominator of Welch's t-test for unequal variances.
如果只有两个团体和自由度是一个比样本量较少,这给了韦尔奇的异方差t-检验的分母。
值----------Value----------
A list with components
与组件列表
参数:var
effective pooled sample variance
有效汇集样本方差
参数:df
effective pooled degrees of freedom
有效汇集自由度
参数:multiplier
pooled multiplier
汇集乘数
作者(S)----------Author(s)----------
Gordon Smyth
参考文献----------References----------
Biometrika 29, 350-362.
Biometrics Bulletin 2, 110-114.
Biometrika 34, 28-35.
参见----------See Also----------
10.Other
10。其他
举例----------Examples----------
# Welch's t-test with unequal variances[韦尔奇的t检验不平等差异]
x <- rnorm(10,mean=1,sd=2)
y <- rnorm(20,mean=2,sd=1)
s2 <- c(var(x),var(y))
n <- c(10,20)
out <- poolVar(var=s2,n=n)
tstat <- (mean(x)-mean(y)) / sqrt(out$var*out$multiplier)
pvalue <- 2*pt(-abs(tstat),df=out$df)
# Equivalent to t.test(x,y)[相当于t.test(X,Y)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|