找回密码
 注册
查看: 5505|回复: 0

R语言:Wilcoxon()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-17 10:18:42 | 显示全部楼层 |阅读模式
Wilcoxon(stats)
Wilcoxon()所属R语言包:stats

                                        Distribution of the Wilcoxon Rank Sum Statistic
                                         Wilcoxon秩和统计分布

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Density, distribution function, quantile function and random generation for the distribution of the Wilcoxon rank sum statistic obtained from samples with size m and n, respectively.
密度分布函数,分位数函数和Wilcoxon秩和大小m和n,分别从样品中获得的统计分布的随机生成。


用法----------Usage----------


dwilcox(x, m, n, log = FALSE)
pwilcox(q, m, n, lower.tail = TRUE, log.p = FALSE)
qwilcox(p, m, n, lower.tail = TRUE, log.p = FALSE)
rwilcox(nn, m, n)



参数----------Arguments----------

参数:x, q
vector of quantiles.
位数的向量。


参数:p
vector of probabilities.
概率向量。


参数:nn
number of observations. If length(nn) > 1, the length is taken to be the number required.
观测数。如果length(nn) > 1,长度是所需的数量。


参数:m, n
numbers of observations in the first and second sample, respectively.  Can be vectors of positive integers.
观测的数字,分别在第一和第二个样本。可以是正整数向量。


参数:log, log.p
logical; if TRUE, probabilities p are given as log(p).
逻辑;如果为TRUE,概率P日志(P)。


参数:lower.tail
logical; if TRUE (default), probabilities are P[X ≤ x], otherwise, P[X > x].
逻辑;如果是TRUE(默认),概率P[X ≤ x],否则,“P[X > x]。


Details

详情----------Details----------

This distribution is obtained as follows.  Let x and y be two random, independent samples of size m and n. Then the Wilcoxon rank sum statistic is the number of all pairs (x[i], y[j]) for which y[j] is not greater than x[i].  This statistic takes values between 0 and m * n, and its mean and variance are m * n / 2 and m * n * (m + n + 1) / 12, respectively.
这种分布规律如下。让我们x和y是两个随机,独立样本大小m和n。 Wilcoxon秩和统计是对所有的数(x[i], y[j]),y[j]是不是比x[i]。这一统计数字0和m * n之间的值,其均值和方差m * n / 2和m * n * (m + n + 1) / 12,分别。

If any of the first three arguments are vectors, the recycling rule is used to do the calculations for all combinations of the three up to the length of the longest vector.
如果前三个参数是向量,回收规则是用来做计算,三个最多最长的向量长度的所有组合。


值----------Value----------

dwilcox gives the density, pwilcox gives the distribution function, qwilcox gives the quantile function, and rwilcox generates random deviates.
dwilcox给人的密度,pwilcox给出了分布函数,qwilcox给人的分量功能,rwilcox产生随机的偏离。


警告----------Warning----------

These functions can use large amounts of memory and stack (and even crash R if the stack limit is exceeded and stack-checking is not in place) if one sample is large (several thousands or more).
这些功能可以使用大量的内存和栈(甚至崩溃ŕ如果堆栈超出限制时,堆栈检查不到位)如果一个样本是大(数千或更多)。


注意----------Note----------

S-PLUS uses a different (but equivalent) definition of the Wilcoxon statistic: see wilcox.test for details.
,S-PLUS采用了不同的秩统计(相当)的定义:详情wilcox.test。


作者(S)----------Author(s)----------


Kurt Hornik



源----------Source----------

These are calculated via recursion, based on cwilcox(k, m, n), the number of choices with statistic k from samples of size m and n, which is itself calculated recursively and the results cached.  Then dwilcox and pwilcox sum appropriate values of cwilcox, and qwilcox is based on inversion.
这些都是通过递归计算的基础上cwilcox(k, m, n),选择与统计数k从样本大小m和n,这本身就是递归计算结果缓存。然后dwilcox和pwilcoxcwilcox,qwilcox基于反演的总和适当的值。

rwilcox generates a random permutation of ranks and evaluates the statistic.
rwilcox生成随机行列的置换和评估统计。


参见----------See Also----------

wilcox.test to calculate the statistic from data, find p values and so on.
wilcox.test计算从数据统计,发现p值等。

Distributions for standard distributions, including dsignrank for the distribution of the one-sample Wilcoxon signed rank statistic.
为标准的分布,包括dsignrank一个样本秩的分布符号秩统计分布。


举例----------Examples----------


require(graphics)

x <- -14*6 + 1)
fx <- dwilcox(x, 4, 6)
Fx <- pwilcox(x, 4, 6)

layout(rbind(1,2), widths=1, heights=c(3,2))
plot(x, fx,type='h', col="violet",
     main= "robabilities (density) of Wilcoxon-Statist.(n=6,m=4)")
plot(x, Fx,type="s", col="blue",
     main= "Distribution of Wilcoxon-Statist.(n=6,m=4)")
abline(h=0:1, col="gray20",lty=2)
layout(1)# set back[重新设置]

N <- 200
hist(U <- rwilcox(N, m=4,n=6), breaks=0:25 - 1/2,
     border="red", col="pink", sub = paste("N =",N))
mtext("N * f(x),  f() = true \"density\"", side=3, col="blue")
lines(x, N*fx, type='h', col='blue', lwd=2)
points(x, N*fx, cex=2)

## Better is a Quantile-Quantile Plot[#更好的是一个位数位数图]
qqplot(U, qw <- qwilcox((1:N - 1/2)/N, m=4,n=6),
       main = paste("Q-Q-Plot of empirical and theoretical quantiles",
                     "Wilcoxon Statistic,  (m=4, n=6)",sep="\n"))
n <- as.numeric(names(print(tU <- table(U))))
text(n+.2, n+.5, labels=tU, col="red")

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-1-23 02:18 , Processed in 0.022312 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表