grubbs.test(outliers)
grubbs.test()所属R语言包:outliers
Grubbs tests for one or two outliers in data sample
格拉布斯一个或两个数据样本离群值的测试
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Performs Grubbs' test for one outlier, two outliers on one tail, or two outliers on opposite tails, in small sample.
执行Grubbs检验离群值,异常值上一个尾巴,或两个相反的尾巴,在小样本的异常值。
用法----------Usage----------
grubbs.test(x, type = 10, opposite = FALSE, two.sided = FALSE)
参数----------Arguments----------
参数:x
a numeric vector for data values.
数据值的一个数值向量。
参数:opposite
a logical indicating whether you want to check not the value with largest difference from the mean, but opposite (lowest, if most suspicious is highest etc.)
逻辑表明是否要检查没有价值的平均最大的区别,但相反的(最低的,如果最可疑的是最高等)
参数:type
Integer value indicating test variant. 10 is a test for one outlier (side is detected automatically and can be reversed by opposite parameter). 11 is a test for two outliers on opposite tails, 20 is test for two outliers in one tail.
整数值,表示测试的变体。 10测试一个离群值(侧被自动检测到,并且可以逆转opposite参数)。 11是一个测试两个相反的尾巴上的异常值,20是1尾中的离群值进行测试。
参数:two.sided
Logical value indicating if there is a need to treat this test as two-sided.
逻辑值,该值指示,如果有一个需要治疗双面此测试。
Details
详细信息----------Details----------
The function can perform three tests given and discussed by Grubbs (1950).
该函数可以执行三个测试者格鲁布斯(1950)给出和讨论。
First test (10) is used to detect if the sample dataset contains one outlier, statistically different than the other values. Test is based by calculating score of this outlier G (outlier minus mean and divided by sd) and comparing it to appropriate critical values. Alternative method is calculating ratio of variances of two datasets - full dataset and dataset without outlier. The obtained value called U is bound with G by simple formula.
(10)第一次测试是用来检测的样本数据集包含一个异常值,在统计学上比其他值。测试是基于通过计算得分的这个离群ĝ(离群值减去平均值和除以SD)和适当的临界值进行比较。另一种方法是计算两个数据集的方差比 - 没有完整的数据集,数据集离群。通过简单的公式得到的值称为U与G的约束。
Second test (11) is used to check if lowest and highest value are two outliers on opposite tails of sample. It is based on calculation of ratio of range to standard deviation of the sample.
用于第二次测试(11),以检查是否最低和最高值的两种离群点上的样品的相对尾巴。它是基于计算的范围内的样品的标准偏差的比率。
Third test (20) calculates ratio of variance of full sample and sample without two extreme observations. It is used to detect if dataset contains two outliers on the same tail.
第三个测试(20)计算的全样本和样本的方差比没有两个极端的意见。它是用来检测,如果数据集包含两个相同的尾巴上的异常值。
The p-values are calculated using qgrubbs function.
P值计算使用qgrubbs功能。
值----------Value----------
<table summary="R valueblock"> <tr valign="top"><td>statistic</td> <td> the value statistic. For type 10 it is difference between outlier and the mean divided by standard deviation, and for type 20 it is sample range divided by standard deviation. Additional value U is ratio of sample variances with and withour suspicious outlier. According to Grubbs (1950) these values for type 10 are bound by simple formula and only one of them can be used, but function gives both. For type 20 the G is the same as U.</td></tr> <tr valign="top"><td>p.value</td> <td> the p-value for the test.</td></tr> <tr valign="top"><td>alternative</td> <td> a character string describing the alternative hypothesis.</td></tr> <tr valign="top"><td>method</td> <td> a character string indicating what type of test was performed.</td></tr> <tr valign="top"><td>data.name</td> <td> name of the data argument.</td></tr>
<table summary="R valueblock"> <tr valign="top"> <TD> statistic</ TD> <TD>值统计。 10型是区别离群值和平均值除以标准差,键入20,它是标准差除以样本范围。额外的U值是全无可疑异常值和样本方差比的。根据格拉布斯(1950)型10这些值是通过简单的公式的约束,他们只有一个可以使用,但功能不仅提供。对于类型20 G是一样U. </ TD> </ TR> <tr valign="top"> <TD> p.value</ TD> <TD>的p-值的测试。 </ TD> </ TR> <tr valign="top"> <TD>alternative</ TD> <td>一个字符串,描述了另一种假设。</ TD> </ TR> <TR VALIGN =“”> <TD>method </ TD> <td>一个字符串,表示什么类型的试验。</ TD> </ TR> <tr valign="top"> <TD> data.name</ TD>的数据参数<TD>名。</ TD> </ TR>
</table>
</ TABLE>
(作者)----------Author(s)----------
Lukasz Komsta
参考文献----------References----------
Grubbs, F.E. (1950). Sample Criteria for testing outlying observations. Ann. Math. Stat. 21, 1, 27-58.
参见----------See Also----------
dixon.test, chisq.out.test
dixon.test,chisq.out.test
实例----------Examples----------
set.seed(1234)
x = rnorm(10)
grubbs.test(x)
grubbs.test(x,type=20)
grubbs.test(x,type=11)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|