kruskal.test(stats)
kruskal.test()所属R语言包:stats
Kruskal-Wallis Rank Sum Test
克鲁斯卡-Wallis秩和检验
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Performs a Kruskal-Wallis rank sum test.
执行一个的克鲁斯卡尔-Wallis秩和检验。
用法----------Usage----------
kruskal.test(x, ...)
## Default S3 method:[默认方法]
kruskal.test(x, g, ...)
## S3 method for class 'formula'[类formula的方法]
kruskal.test(formula, data, subset, na.action, ...)
参数----------Arguments----------
参数:x
a numeric vector of data values, or a list of numeric data vectors.
的数字矢量数据值,或数字数据向量的列表。
参数:g
a vector or factor object giving the group for the corresponding elements of x. Ignored if x is a list.
x相应的元素给一个向量或因素的对象组。被忽略,如果x是一个列表。
参数:formula
a formula of the form lhs ~ rhs where lhs gives the data values and rhs the corresponding groups.
一个公式的形式lhs ~ rhs其中lhs给人的数据值和rhs相应的组。
参数:data
an optional matrix or data frame (or similar: see model.frame) containing the variables in the formula formula. By default the variables are taken from environment(formula).
一个可选的矩阵或数据框(或类似:看到model.frame)包含公式formula的变量。默认情况下采取的变量从environment(formula)。
参数:subset
an optional vector specifying a subset of observations to be used.
一个可选的向量,指定要使用的意见的一个子集。
参数:na.action
a function which indicates what should happen when the data contain NAs. Defaults to getOption("na.action").
一个函数,它表示数据时,包含NA的,应该发生什么。 getOption("na.action")默认。
参数:...
further arguments to be passed to or from methods.
进一步的参数被传递到或从方法。
Details
详情----------Details----------
kruskal.test performs a Kruskal-Wallis rank sum test of the null that the location parameters of the distribution of x are the same in each group (sample). The alternative is that they differ in at least one.
kruskal.test执行空克鲁斯卡尔-Wallis秩和检验,分布的位置参数x各组相同(样本)。另一种方法是,他们至少在一个不同。
If x is a list, its elements are taken as the samples to be compared, and hence have to be numeric data vectors. In this case, g is ignored, and one can simply use kruskal.test(x) to perform the test. If the samples are not yet contained in a list, use kruskal.test(list(x, ...)).
如果x是一个列表,其元素是采取样品进行比较,因此必须是数字数据向量。在这种情况下,g被忽略,可以简单地使用kruskal.test(x)进行测试。如果样本尚未在名单中,使用kruskal.test(list(x, ...))。
Otherwise, x must be a numeric data vector, and g must be a vector or factor object of the same length as x giving the group for the corresponding elements of x.
否则,x必须是数字数据向量,和g必须x给x相应的元素组相同长度的向量或因素的对象, 。
值----------Value----------
A list with class "htest" containing the following components:
一类"htest"包含以下组件的列表:
参数:statistic
the Kruskal-Wallis rank sum statistic.
克鲁斯卡尔 - 沃利斯秩统计。
参数:parameter
the degrees of freedom of the approximate chi-squared distribution of the test statistic.
自由的近似卡方检验统计量的分布度。
参数:p.value
the p-value of the test.
p值的测试。
参数:method
the character string "Kruskal-Wallis rank sum test".
字符串"Kruskal-Wallis rank sum test"。
参数:data.name
a character string giving the names of the data.
字符串提供的数据的名称。
参考文献----------References----------
Nonparametric Statistical Methods. New York: John Wiley & Sons. Pages 115–120.
参见----------See Also----------
The Wilcoxon rank sum test (wilcox.test) as the special case for two samples; lm together with anova for performing one-way location analysis under normality assumptions; with Student's t test (t.test) as the special case for two samples.
Wilcoxon秩和检验(wilcox.test)作为两个样品的特殊情况;lm一起anova常态假设下执行单向的位置与学生的t检验分析;(t.test)作为两个样品的特殊情况。
wilcox_test in package coin for exact, asymptotic and Monte Carlo conditional p-values, including in the presence of ties.
wilcox_test包coin确切的,渐进的和蒙特卡洛条件的p-值,包括中存在的关系。
举例----------Examples----------
## Hollander & Wolfe (1973), 116.[#霍兰德和沃尔夫(1973),116。]
## Mucociliary efficiency from the rate of removal of dust in normal[#纤毛的正常率从除尘效率]
## subjects, subjects with obstructive airway disease, and subjects[#科目,与气道阻塞性疾病的受试者,受试者]
## with asbestosis.[#与石棉肺。]
x <- c(2.9, 3.0, 2.5, 2.6, 3.2) # normal subjects[正常人]
y <- c(3.8, 2.7, 4.0, 2.4) # with obstructive airway disease[气道阻塞性疾病]
z <- c(2.8, 3.4, 3.7, 2.2, 2.0) # with asbestosis[与石棉肺]
kruskal.test(list(x, y, z))
## Equivalently,[#等价,]
x <- c(x, y, z)
g <- factor(rep(1:3, c(5, 4, 5)),
labels = c("Normal subjects",
"Subjects with obstructive airway disease",
"Subjects with asbestosis"))
kruskal.test(x, g)
## Formula interface.[#公式接口。]
require(graphics)
boxplot(Ozone ~ Month, data = airquality)
kruskal.test(Ozone ~ Month, data = airquality)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|