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

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

[复制链接]
发表于 2012-2-16 21:57:33 | 显示全部楼层 |阅读模式
prop.test(stats)
prop.test()所属R语言包:stats

                                        Test of Equal or Given Proportions
                                         平等或比例的试验

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

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

prop.test can be used for testing the null that the proportions (probabilities of success) in several groups are the same, or that they equal certain given values.
prop.test可以用来测试空,在几组的比例(成功概率)是相同的,或者说他们等于某一给定值。


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


prop.test(x, n, p = NULL,
          alternative = c("two.sided", "less", "greater"),
          conf.level = 0.95, correct = TRUE)



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

参数:x
a vector of counts of successes, a one-dimensional table with two entries, or a two-dimensional table (or matrix) with 2 columns, giving the counts of successes and failures, respectively.
计数的成功,有两个项目的一维表,或一个二维表2列(或矩阵),分别给予成功和失败,计数,向量。


参数:n
a vector of counts of trials; ignored if x is a matrix or a table.
向量的审判计数;忽略x如果是一个矩阵或表。


参数:p
a vector of probabilities of success.  The length of p must be the same as the number of groups specified by x, and its elements must be greater than 0 and less than 1.
成功的概率向量。的p长度必须是相同的指定x组,并其元素必须是大于0且小于1。


参数:alternative
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less".  You can specify just the initial letter.  Only used for testing the null that a single proportion equals a given value, or that two proportions are equal; ignored otherwise.
一个字符串,指定替代假说,必须是一个"two.sided"(默认),"greater"或"less"。您可以指定只的首字母。仅用于测试一个单一的比例等于给定值,或者两个比例是相等的空,否则忽略。


参数:conf.level
confidence level of the returned confidence interval.  Must be a single number between 0 and 1.  Only used when testing the null that a single proportion equals a given value, or that two proportions are equal; ignored otherwise.
返回的置信区间的置信水平。必须是单数0和1之间。测试时,只用一个单一的比例等于给定值,或者两个比例是相等的空,否则忽略。


参数:correct
a logical indicating whether Yates' continuity correction should be applied where possible.
逻辑是否耶茨连续性校正在可能的情况下,应适用于。


Details

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

Only groups with finite numbers of successes and failures are used. Counts of successes and failures must be nonnegative and hence not greater than the corresponding numbers of trials which must be positive.  All finite counts should be integers.
只有成功和失败的数量有限的群体。成功和失败的计数必须非负,因此不大于相应的数字必须是积极的试验。所有有限的数量应为整数。

If p is NULL and there is more than one group, the null tested is that the proportions in each group are the same.  If there are two groups, the alternatives are that the probability of success in the first group is less than, not equal to, or greater than the probability of success in the second group, as specified by alternative.  A confidence interval for the difference of proportions with confidence level as specified by conf.level and clipped to [-1,1] is returned.  Continuity correction is used only if it does not exceed the difference of the sample proportions in absolute value.  Otherwise, if there are more than 2 groups, the alternative is always "two.sided", the returned confidence interval is NULL, and continuity correction is never used.
如果p是NULL“有多个组,测试空的是,在每个组的比例是相同的。如果有两组,替代品,在第一组中成功的概率是小于,等于或超过指定alternative,在第二组的成功概率更大。一个置信区间与置信水平和裁剪conf.level[-1,1]指定比例的差异,则返回。连续性校正使用,只有当它不超过绝对值的样本比例的差异。否则,如果有超过2组,替代始终是"two.sided"返回的置信区间NULL,连续性校正从来没有使用过。

If there is only one group, then the null tested is that the underlying probability of success is p, or .5 if p is not given.  The alternative is that the probability of success is less than, not equal to, or greater than p or 0.5, respectively, as specified by alternative.  A confidence interval for the underlying proportion with confidence level as specified by conf.level and clipped to [0,1] is returned.  Continuity correction is used only if it does not exceed the difference between sample and null proportions in absolute value. The confidence interval is computed by inverting the score test.
如果是只有一组,然后空测试是成功的基础概率是p,或0.5 p如果没有给出。另一种方法是成功的概率是小于,不等于,或比p或0.5,分别指定alternative,。一个置信水平为基础比例的置信区间和裁剪conf.level[0,1]指定返回。连续性校正使用,只有当它不超过样品和空比例之间的差异绝对值。置信区间的计算方法是反相的得分测试。

Finally, if p is given and there are more than 2 groups, the null tested is that the underlying probabilities of success are those given by p.  The alternative is always "two.sided", the returned confidence interval is NULL, and continuity correction is never used.
最后,如果p,有超过2组,空测试是成功的潜在可能性是p给出的。另一种方法是始终"two.sided"返回的置信区间NULL,连续性校正从来没有使用过。


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

A list with class "htest" containing the following components:
一类"htest"包含以下组件的列表:


参数:statistic
the value of Pearson's chi-squared test statistic.
Pearson的卡方检验统计量的值。


参数:parameter
the degrees of freedom of the approximate chi-squared distribution of the test statistic.
自由的近似卡方检验统计量的分布度。


参数:p.value
the p-value of the test.
p值的测试。


参数:estimate
a vector with the sample proportions x/n.
样本比例的向量x/n。


参数:conf.int
a confidence interval for the true proportion if there is one group, or for the difference in proportions if there are 2 groups and p is not given, or NULL otherwise.  In the cases where it is not NULL, the returned confidence interval has an asymptotic confidence level as specified by conf.level, and is appropriate to the specified alternative hypothesis.
一个真实比例的置信区间,如果有一组,或在比例的差异,如果有2组和p没有给出,或NULL否则。在的情况下,它是不是NULL,返回的置信区间有一个渐进的信心水平,为指定conf.level,是适当的,以指定替代假说。


参数:null.value
the value of p if specified by the null, or NULL otherwise.
值p如果指定空,或NULL否则。


参数:alternative
a character string describing the alternative.
字符串描述替代。


参数:method
a character string indicating the method used, and whether Yates' continuity correction was applied.
一个字符串,指示所使用的方法,以及是否耶茨的连续性校正。


参数:data.name
a character string giving the names of the data.
字符串提供的数据的名称。


参考文献----------References----------

statistical inference. J. Am. Stat. Assoc., 22, 209–212.
Proportion: Comparison of Seven Methods. Statistics in Medicine 17, 857–872.
Independent Proportions: Comparison of Eleven Methods. Statistics in Medicine 17, 873–890.

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

binom.test for an exact test of a binomial
binom.test为二项式确切测试


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


heads <- rbinom(1, size=100, prob = .5)
prop.test(heads, 100)          # continuity correction TRUE by default[连续性校正默认为true]
prop.test(heads, 100, correct = FALSE)

## Data from Fleiss (1981), p. 139.[#弗莱斯(1981),P的数据。 139。]
## H0: The null hypothesis is that the four populations from which[#H 0:零假设是,四个群体]
##     the patients were drawn have the same true proportion of smokers.[#患者均画有真正的烟民比例相同。]
## A:  The alternative is that this proportion is different in at[#答:另一种方法是,这一比例是在不同的]
##     least one of the populations.[#最少的群体之一。]

smokers  <- c( 83, 90, 129, 70 )
patients <- c( 86, 93, 136, 82 )
prop.test(smokers, patients)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-23 12:58 , Processed in 0.039321 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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