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

R语言 VGAM包 Betabinom()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 15:25:44 | 显示全部楼层 |阅读模式
Betabinom(VGAM)
Betabinom()所属R语言包:VGAM

                                        The Beta-Binomial Distribution
                                         β-二项分布

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

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

Density, distribution function, and random generation for the beta-binomial distribution.
密度,分布函数,随机生成的β-二项分布。


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


dbetabinom(x, size, prob, rho = 0, log = FALSE)
pbetabinom(q, size, prob, rho, log.p = FALSE)
rbetabinom(n, size, prob, rho = 0)
dbetabinom.ab(x, size, shape1, shape2, log = FALSE, .dontuse.prob = NULL)
pbetabinom.ab(q, size, shape1, shape2, log.p = FALSE)
rbetabinom.ab(n, size, shape1, shape2, .dontuse.prob = NULL)



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

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


参数:size
number of trials.
试验次数。


参数:n
number of observations. Must be a positive integer of length 1.
若干意见。必须是一个长度为1的正整数。


参数:prob
the probability of success mu. Must be in the unit closed interval [0,1].  
概率的成功mu。必须在单位闭区间[0,1]。


参数:rho
the correlation parameter rho. Usually must be in the unit open interval (0,1), however, the value 0 is sometimes supported (if so then it corresponds to the usual binomial distribution).  
的相关参数rho。一般必须在单位开区间(0,1),然而,将值0有时支持(若有那么它对应于通常的二项式分布)。


参数:shape1, shape2
the two (positive) shape parameters of the standard beta distribution. They are called a and b in beta respectively.  
两个(正)的标准beta分布的形状参数。他们被称为a和b中beta分别。


参数:log, log.p
Logical. If TRUE then all probabilities p are given as log(p).  
逻辑。如果TRUE然后所有的概率p是log(p)。


参数:.dontuse.prob
An argument that should be ignored and unused.  
一个论点,即应被忽略,未使用的。


Details

详细信息----------Details----------

The beta-binomial distribution is a binomial distribution whose probability of success is not a constant but it is generated from a beta distribution with parameters shape1 and shape2. Note that the mean of this beta distribution is mu = shape1/(shape1+shape2), which therefore is the mean or the probability of success.
β-二项分布,二项式分布,其成功的概率是不是一个常数,但它产生的β分布参数shape1和shape2。需要注意的是beta分布的平均值,这是mu = shape1/(shape1+shape2),因此平均或成功的概率。

See betabinomial and betabinomial.ab, the VGAM family functions for estimating the parameters, for the formula of the probability density function and other details.
见betabinomial和betabinomial.ab,VGAM的家庭功能参数估计,对公式的概率密度函数和其他细节。


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

dbetabinom and dbetabinom.ab give the density, pbetabinom and pbetabinom.ab give the distribution function, and  rbetabinom and rbetabinom.ab generate random deviates.
dbetabinom和dbetabinom.ab给密度,pbetabinom和pbetabinom.ab的分布函数,并rbetabinom和rbetabinom.ab产生随机的偏离。


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

pbetabinom and pbetabinom.ab can be particularly slow. The functions here ending in .ab are called from those functions which don't. The simple transformations mu=alpha/(alpha+beta) and rho=1/(1+alpha+beta) are used, where alpha and beta are the two shape parameters.
pbetabinom和pbetabinom.ab可以特别慢。在这里.ab被称为功能不结束的功能。简单的转换mu=alpha/(alpha+beta)和rho=1/(1+alpha+beta)使用,其中alpha和beta是两个形状参数。


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


T. W. Yee



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

betabinomial, betabinomial.ab.
betabinomial,betabinomial.ab。


实例----------Examples----------


set.seed(1)
rbetabinom(10, 100, prob = 0.5)
set.seed(1)
rbinom(10, 100, prob = 0.5)  # The same since rho = 0[相同的,因为ρ= 0]

## Not run:  N = 9; xx = 0:N; s1 = 2; s2 = 3[#不运行:N = 9; XX = 0:N,S1 = 2,S2 = 3]
dy = dbetabinom.ab(xx, size = N, shape1 = s1, shape2 = s2)
barplot(rbind(dy, dbinom(xx, size = N, prob = s1 / (s1+s2))),
        beside = TRUE, col = c("blue","green"), las = 1,
        main = paste("Beta-binomial (size=",N,", shape1=",s1,
                   ", shape2=",s2,") (blue) vs\n",
        " Binomial(size=", N, ", prob=", s1 / (s1+s2), ") (green)", sep = ""),
        names.arg = as.character(xx), cex.main = 0.8)
sum(dy*xx) # Check expected values are equal[预期值是相等的]
sum(dbinom(xx, size = N, prob = s1 / (s1+s2))*xx)
cumsum(dy) -  pbetabinom.ab(xx, N, shape1 = s1, shape2 = s2)

y = rbetabinom.ab(n = 10000, size = N, shape1 = s1, shape2 = s2)
ty = table(y)
barplot(rbind(dy, ty / sum(ty)),
        beside = TRUE, col = c("blue","red"), las = 1,
        main = paste("Beta-binomial (size=",N,", shape1=",s1,
                   ", shape2=",s2,") (blue) vs\n",
        " Random generated beta-binomial(size=", N, ", prob=", s1/(s1+s2),
        ") (red)", sep = ""), cex.main = 0.8,
        names.arg = as.character(xx))
## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 21:28 , Processed in 0.020580 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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