beta_gamma(zipfR)
beta_gamma()所属R语言包:zipfR
Incomplete Beta and Gamma Functions (zipfR)
不完整的β和γ的功能(zipfR)
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The functions documented here compute incomplete and regularized Beta and Gamma functions as well as their logarithms and the corresponding inverse functions. These functions will be of interest to developers, not users of the toolkit.
这里记录的功能,计算不完整的,正规化的β和γ功能,以及其对数和相应的反函数。这些功能将有兴趣的开发人员,而不是用户的工具包。
用法----------Usage----------
Cgamma(a, log=!missing(base), base=exp(1))
Igamma(a, x, lower=TRUE, log=!missing(base), base=exp(1))
Igamma.inv(a, y, lower=TRUE, log=!missing(base), base=exp(1))
Rgamma(a, x, lower=TRUE, log=!missing(base), base=exp(1))
Rgamma.inv(a, y, lower=TRUE, log=!missing(base), base=exp(1))
Cbeta(a, b, log=!missing(base), base=exp(1))
Ibeta(x, a, b, lower=TRUE, log=!missing(base), base=exp(1))
Ibeta.inv(y, a, b, lower=TRUE, log=!missing(base), base=exp(1))
Rbeta(x, a, b, lower=TRUE, log=!missing(base), base=exp(1))
Rbeta.inv(y, a, b, lower=TRUE, log=!missing(base), base=exp(1))
参数----------Arguments----------
参数:a, b
non-negative numeric vectors, the parameters of the Gamma and Beta functions (b applies only to Beta functions)
非负数值变量,参数的Gamma和Beta函数(b仅适用于测试功能)
参数:x
a non-negative numeric vector, the point at which the incomplete or regularized Gamma or Beta function is evaluated (for the Beta functions, x must be in the range [0,1]
一个非负的数值向量,在该点的不完整或正规化伽玛或贝塔函数被求值(的Beta功能,x必须在的范围[0,1]
参数:y
a non-negative numeric vector, the values of the Gamma or Beta function on linear or logarithmic scale
一个非负的数值向量,Gamma或贝塔函数的值的线性或对数刻度上
参数:lower
whether to compute the lower (TRUE) or upper (FALSE) incomplete or regularized Gamma or Beta function
是否计算(TRUE)或上(FALSE)不完整或正规化Gamma或Beta函数
参数:log
if TRUE, return values of the Gamma and Beta functions – as well as the y argument of the inverse functions – are on logarithmic scale
如果TRUE,返回值的Gamma和Beta功能 - 以及y参数的反函数 - 对数尺度
参数:base
a positive number, specifying the base of the logarithmic scale for values of the Gamma and Beta functions (default: natural logarithm). Setting the base parameter implies log=TRUE.
一个正数,指定对数刻度值的Gamma和Beta函数(默认:自然对数)的基础。设置base参数意味着log=TRUE。
值----------Value----------
Cgamma returns the (complete) Gamma function evaluated at a, Γ(a). Igamma returns the (lower or upper) incomplete Gamma function with parameter a evaluated at point x, γ(a,x) (lower=TRUE) or Γ(a,x) (lower=FALSE). Rgamma returns the corresponding regularized Gamma function, P(a,x) (lower=TRUE) or Q(a,x) (lower=FALSE). If log=TRUE, the returned values are on logarithmic scale as specified by the base parameter.
Cgamma返回伽玛函数(完整)评估在a,Γ(a)。 Igamma返回(或上,下)不完全伽玛函数参数a评估点x,γ(a,x)(lower=TRUE)或Γ(a,x)( lower=FALSE“)。 Rgamma返回相应的正规化伽玛功能,P(a,x)(lower=TRUE)或Q(a,x)(lower=FALSE)。如果log=TRUE,返回的值是对数尺度指定的base参数。
Igamma.inv and Rgamma.inv compute the inverse of the incomplete and regularized Gamma functions with respect to the parameter x. I.e., Igamma.inv(a,y) returns the point x at which the (lower or upper) incomplete Gamma function with parameter a evaluates to y, and mutatis mutandis for Rgamma.inv(a,y). If log=TRUE, the parameter y is taken to be on a logarithmic scale as specified by base.
Igamma.inv和Rgamma.inv计算的逆不完整的,正规化的伽玛功能方面的参数x。也就是说,Igamma.inv(a,y)返回x(或上,下)不完全伽玛函数的参数a评估y,比照Rgamma.inv(a,y) 。如果log=TRUE,参数y被视为是对数刻度上指定的base。
Cbeta returns the (complete) Beta function with arguments a and b, B(a,b). Ibeta returns the (lower or upper) incomplete Beta function with parameters a and b, evaluated at point x, B(x;a,b) (lower=TRUE) and B*(x;a,b) (lower=FALSE). Note that in contrast to the Gamma functions, capital B refers to the lower incomplete Beta function, and there is no standardized notation for the upper incomplete Beta function, so B* is used here as an ad-hoc symbol. Rbeta returns the corresponding regularized Beta function, I(x;a,b) (lower=FALSE) or I*(x;a,b) (lower=TRUE). If log=TRUE, the returned values are on logarithmic scale as specified by the base parameter.
Cbeta返回(完成)Beta函数带参数的a和b,B(a,b)。 Ibeta返回(或上,下)不完全Beta函数参数a和b,评估点x,B(x;a,b)(lower=TRUE)和B*(x;a,b)(lower=FALSE)。请注意,在对比的伽玛功能,资本B是指低不完整的测试功能,并没有标准化的符号上不完整的测试功能,所以B*这里使用的是一个ad-hoc符号。 Rbeta返回相应的正规化Beta函数,I(x;a,b)(lower=FALSE)或I*(x;a,b)(lower=TRUE)。如果log=TRUE,返回的值是对数尺度指定的base参数。
Ibeta.inv and Rbeta.inv compute the inverse of the incomplete and regularized Beta functions with respect to the parameter x. I.e., Ibeta.inv(y,a,b) returns the point x at which the (lower or upper) incomplete Beta function with parameters a and b evaluates to y, and mutatis mutandis for Rbeta.inv(y,a,b). If log=TRUE, the parameter y is taken to be on a logarithmic scale as specified by base.
Ibeta.inv和Rbeta.inv计算的逆不完整的,正规化的测试功能方面的参数x。 ,Ibeta.inv(y,a,b)返回x(或上,下)不完全Beta函数与参数a和b值y,比照适用Rbeta.inv(y,a,b)。如果log=TRUE,参数y被视为是对数刻度上指定的base。
All Gamma and Beta functions can be vectorized in the arguments x, y, a and b, with the usual R value recycling rules in the case of multiple vectorizations.
所有γ和β函数的参数中可以量化的x,y,a和b,与一般的R值回收规则在多个vectorizations的情况下。
数学详情----------Mathematical Details----------
The upper incomplete Gamma function is defined by the Gamma integral
上部的不完整的伽马函数所定义的Gamma积分
The lower incomplete Gamma function is defined by the complementary Gamma integral
较低的不完整的伽马函数定义通过互补伽玛积分
The complete Gamma function calculates the full Gamma integral, i.e. Γ(a) = γ(a,0). The regularized Gamma functions scale the corresponding incomplete Gamma functions to the interval [0,1], by dividing through Γ(a). Thus, the lower regularized Gamma function is given by
完整的伽玛功能伽玛积分计算,即Γ(a) = γ(a,0)。正规化的伽玛功能的扩展相应的不完全γ函数的时间间隔[0,1],除以通过Γ(a)。因此,较低的正规化伽玛函数由下式给出
and the upper regularized Gamma function is given by
和上部的正规化伽玛函数由下式给出
The lower incomplete Beta function is defined by the Beta integral
较低的不完全Beta函数定义的Beta积分
and the upper incomplete Beta function is defined by the complementary integral
和上部是指由不完全β函数的互补积分
The complete Beta function calculates the full Beta integral, i.e. B(a,b) = B(1;a,b) = B*(0;a,b). The regularized Beta function scales the incomplete Beta function to the interval [0,1], by dividing through B(a,b). The lower regularized Beta function is thus given by
全面公测完整的Beta函数计算积分,即B(a,b) = B(1;a,b) = B*(0;a,b)。正规化的Beta函数尺度的不完全Beta函数的时间间隔[0,1],,除以通过B(a,b)。较低的正规化测试功能,从而给
and the upper regularized Beta function is given by
和上部的正规化贝塔函数由下式给出
参见----------See Also----------
gamma and lgamma, which are fully equivalent to Cgamma. beta and lbeta, which are fully equivalent to Cbeta
gamma和lgamma,这是完全等价于Cgamma。 beta和lbeta,这是完全等价于Cbeta
The implementations of the incomplete and regularized Gamma functions are based on the Gamma distribution (see pgamma), and those of the Beta functions are based on the Beta distribution (see pbeta).
不完整的,正规化的伽玛功能的实现是基于Gamma分布(见pgamma)和基于Beta分布的Beta函数(见pbeta)。
实例----------Examples----------
Cgamma(5 + 1) # = factorial(5)[=阶乘(5)]
## P(X >= k) for Poisson distribution with mean alpha[#P(X> = K),泊松分布,平均阿尔法]
alpha <- 5
k <- 10
Rgamma(k, alpha) # == ppois(k-1, alpha, lower=FALSE)[== ppois第(k-1,α,低级= FALSE)]
n <- 49
k <- 6
1 / ((n+1) * Cbeta(n-k+1, k+1)) # == choose(n, k)[==请选择(N,K)]
## P(X >= k) for binomial distribution with parameters n and p[#P(X> = K)与参数n和p的二项分布]
n <- 100
p <- .1
k <- 15
Rbeta(p, k, n-k+1) # == pbinom(k-1, n, p, lower=FALSE)[== pbinom第(k-1,N,P,低级= FALSE)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|