gamma2(VGAM)
gamma2()所属R语言包:VGAM
2-parameter Gamma Distribution
2参数Gamma分布
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Estimates the 2-parameter gamma distribution by maximum likelihood estimation.
估计2个参数的伽玛分布的最大似然估计。
用法----------Usage----------
gamma2(lmu = "loge", lshape = "loge", emu = list(), eshape = list(),
imethod = 1, deviance.arg = FALSE, ishape = NULL, zero = -2)
参数----------Arguments----------
参数:lmu, lshape
Link functions applied to the (positive) mu and shape parameters (called mu and shape respectively). See Links for more choices.
链接功能施加到的(正)mu和形状参数(叫做mu和shape分别)。见Links更多的选择。
参数:emu, eshape
List. Extra argument for each of the links. See earg in Links for general information.
列表。每个环节的额外参数。见earg中Links的一般信息。
参数:ishape
Optional initial value for shape. A NULL means a value is computed internally. If a failure to converge occurs, try using this argument. This argument is ignored if used within cqo; see the iShape argument of qrrvglm.control instead.
可选的初始值的形状。 ANULL是指在内部计算的值。如果收敛失败时,尝试使用此参数。内使用cqo;看到iShapeqrrvglm.control,而不是参数,此参数将被忽略。
参数:imethod
An integer with value 1 or 2 which specifies the initialization method for the mu parameter. If failure to converge occurs try another value (and/or specify a value for ishape).
一个整数,值1或2指定为mu参数的初始化方法。如果出现收敛失败尝试另一个值(和/或指定的值ishape)。
参数:deviance.arg
Logical. If TRUE, the deviance function is attached to the object. Under ordinary circumstances, it should be left alone because it really assumes the shape parameter is at the maximum likelihood estimate. Consequently, one cannot use that criterion to minimize within the IRLS algorithm. It should be set TRUE only when used with cqo under the fast algorithm.
逻辑。如果TRUE,越轨功能被附加到该对象。在一般情况下,它应该被单独留在家中,因为它确实假定形状参数的最大似然估计。因此,不能使用该标准,以尽量减少在IRLS算法。它应该被设置TRUE只有当使用cqo下的快速算法。
参数:zero
Integer valued vector, usually assigned -2 or 2 if used at all. Specifies which of the two linear/additive predictors are modelled as an intercept only. By default, the shape parameter (after lshape is applied) is modelled as a single unknown number that is estimated. It can be modelled as a function of the explanatory variables by setting zero = NULL. A negative value means that the value is recycled, so setting -2 means all shape parameters are intercept only. See CommonVGAMffArguments for more information.
整值向量,通常被分配-2或2如果使用的所有。指定的两个线性/添加剂的预测模型仅作为一个拦截。默认情况下,形状参数(后lshape“)被建模为一个未知的数字,估计。它可以通过设置zero = NULL,作为解释变量的函数模型。负值表示,该值是循环使用,所以设置-2是指只拦截所有的形状参数。见CommonVGAMffArguments更多信息。
Details
详细信息----------Details----------
This distribution can model continuous skewed responses. The density function is given by
这种分布可以模拟持续扭曲的回应。的密度函数由下式给出
for mu > 0, shape > 0 and y > 0. Here, gamma() is the gamma function, as in gamma. The mean of Y is mu=mu (returned as the fitted values) with variance sigma^2 = mu^2 / shape. If 0<shape<1 then the density has a pole at the origin and decreases monotonically as y increases. If shape=1 then this corresponds to the exponential distribution. If shape>1 then the density is zero at the origin and is unimodal with mode at y = mu - mu / shape; this can be achieved with lshape="loglog".
mu > 0,shape > 0和y > 0。在这里,gamma()是伽玛函数,如gamma。 y的均值是mu=mu(返回的拟合值)与方差sigma^2 = mu^2 / shape。如果0<shape<1的密度有一个极点在原点和单调递减y增加。如果shape=1然后此相对应的指数分布。如果shape>1的密度是零的起源和单峰模式y = mu - mu / shape,这可以实现lshape="loglog"。
By default, the two linear/additive predictors are eta1=log(mu) and eta2=log(shape). This family function implements Fisher scoring and the working weight matrices are diagonal.
默认情况下,两个线性/添加剂的预测是eta1=log(mu)和eta2=log(shape)。这间家庭功能实现了费舍尔的得分和工作的权重矩阵对角线。
This VGAM family function handles multivariate responses, so that a matrix can be used as the response. The number of columns is the number of species, say, and zero=-2 means that all species have a shape parameter equalling a (different) intercept only.
该VGAM家庭功能处理多变量的响应,因此,可以将一个矩阵作为响应使用。的列数是物种的数量,也就是说,zero=-2是指所有物种有一个形状参数,只相当于一个(不同的)拦截。
值----------Value----------
An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm and vgam.
类的一个对象"vglmff"(见vglmff-class)。该对象被用于建模功能如vglm和vgam。
注意----------Note----------
The response must be strictly positive. A moment estimator for the shape parameter may be implemented in the future.
必须严格积极的响应。一个可以实现在未来的形状参数的矩估计。
If mu and shape are vectors, then rgamma(n=n, shape=shape, scale=mu/shape) will generate random gamma variates of this parameterization, etc.; see GammaDist.
如果mu和shape是向量,那么rgamma(n=n, shape=shape, scale=mu/shape)会产生随机的伽玛分布随机的这种参数等;看到GammaDist。
For cqo and cao, taking the logarithm of the response means (approximately) a gaussianff family may be used on the transformed data.
对于cqo和cao,取对数响应装置(约)gaussianff家庭可以使用的变换后的数据上。
(作者)----------Author(s)----------
T. W. Yee
参考文献----------References----------
2-parameter gamma distribution described in the monograph
Generalized Linear Models, 2nd ed. London: Chapman & Hall.
参见----------See Also----------
gamma1 for the 1-parameter gamma distribution, gamma2.ab for another parameterization of the 2-parameter gamma distribution, bivgamma.mckay for a bivariate gamma distribution, expexp, GammaDist, golf, CommonVGAMffArguments.
gamma11参数的伽玛分布,gamma2.ab另外的2个参数的伽玛分布的参数设置,bivgamma.mckay的二元伽玛分布的,expexp,GammaDist ,golf,CommonVGAMffArguments。
实例----------Examples----------
# Essentially a 1-parameter gamma[本质上是一个单参数的伽玛]
gdata <- data.frame(y = rgamma(n = 100, shape = exp(1)))
fit1 <- vglm(y ~ 1, gamma1, gdata)
fit2 <- vglm(y ~ 1, gamma2, gdata, trace = TRUE, crit = "coef")
coef(fit2, matrix = TRUE)
Coef(fit2)
# Essentially a 2-parameter gamma[本质上是一个双参数的伽玛]
gdata <- data.frame(y = rgamma(n = 500, rate = exp(1), shape = exp(2)))
fit2 <- vglm(y ~ 1, gamma2, gdata, trace = TRUE, crit = "coef")
coef(fit2, matrix = TRUE)
Coef(fit2)
summary(fit2)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|