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

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

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

                                         Beta-binomial Distribution Family Function
                                         β-二项分布的家庭功能

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

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

Fits a beta-binomial distribution by maximum likelihood estimation. The two parameters here are the mean and correlation coefficient.
适用于β-二项分布的最大似然估计。这里的两个参数的均值和相关系数。


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


betabinomial(lmu = "logit", lrho = "logit", emu = list(), erho = list(),
             irho = NULL, imethod = 1, shrinkage.init = 0.95,
             nsimEIM = NULL, zero = 2)



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

参数:lmu, lrho
Link functions applied to the two parameters. See Links for more choices. The defaults ensure the parameters remain in (0,1), however, see the warning below.  
链接功能施加到的两个参数。见Links更多的选择。默认的参数确保留在(0,1),不过,看到下面的警告。


参数:emu, erho
List. Extra argument for each of the links. See earg in Links for general information.  
列表。每个环节的额外参数。见earg中Links的一般信息。


参数:irho
Optional initial value for the correlation parameter. If given, it must be in (0,1), and is recyled to the necessary length. Assign this argument a value if a convergence failure occurs. Having irho = NULL means an initial value is obtained internally, though this can give unsatisfactory results.  
可选的初始值的相关参数。如果给出,则它必须是在(0,1),,并recyled到必要的长度。指定这个参数的值,如果收敛发生故障。经irho = NULL意味着内部获得一个初始值,虽然这可以得到不能令人满意的结果。


参数:imethod
An integer with value 1 or 2 or ..., which specifies the initialization method for mu. If failure to converge occurs try the another value and/or else specify a value for irho.  
一个整数,值1或2或的,指定初始化方法mu的。如果出现收敛失败尝试另一个值和/或其他指定的值irho。


参数:zero
An integer specifying which linear/additive predictor is to be modelled as an intercept only. If assigned, the single value should be either 1 or 2. The default is to have a single correlation parameter. To model both parameters as functions of the covariates assign zero = NULL. See CommonVGAMffArguments for more information.  
一个整数,指定线性/添加剂的预测中是被定义成仅截距。如果分配的,单值应该是1或2。默认情况下是有一个单一的相关参数。为了模拟这两个参数作为协变量分配zero = NULL的功能,。见CommonVGAMffArguments更多信息。


参数:shrinkage.init, nsimEIM
See CommonVGAMffArguments for more information. The argument shrinkage.init is used only if imethod = 2. Using the argument nsimEIM may offer large advantages for large values of N and/or large data sets.  
见CommonVGAMffArguments更多信息。使用的参数shrinkage.init只有imethod = 2。使用参数nsimEIM可以提供大的优势,为大N和/或大型数据集的值。


Details

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

There are several parameterizations of the beta-binomial distribution. This family function directly models the mean and correlation parameter, i.e., the probability of success.  The model can be written T|P=p ~ Binomial(N,p) where P has a beta distribution with shape parameters alpha and beta. Here, N is the number of trials (e.g., litter size), T=NY is the number of successes, and p is the probability of a success (e.g., a malformation). That is, Y is the proportion of successes. Like binomialff, the fitted values are the estimated probability of success (i.e., E[Y] and not E[T])  and the prior weights N are attached separately on the object in a slot.
有几个参数化的β-二项分布。这间家庭功能的均值和相关参数,即成功的概率模型。该模型可以书面T|P=p ~ Binomial(N,p)其中P有β分布形状参数alpha和beta。在这里,N是试验次数(例如,产仔数),T=NY是成功的次数,和p是一个成功的概率(例如,一个畸形)。也就是说,Y是成功的比例。喜欢binomialff,拟合值的估计的成功概率(即,E[Y]而不是E[T])和现有的权重N附着在对象上分开一个时隙中。

The probability function is
概率函数是

where t=0,1,…,N, and B is the beta function with shape parameters alpha and beta. Recall Y = T/N is the real response being modelled.
t=0,1,…,N,B是beta带形状参数的功能alpha和beta。回忆Y = T/N是真正的响应被建模。

The default model is eta1 =logit(mu) and eta2 = logit(rho) because both parameters lie between 0 and 1. The mean (of Y) is  p = mu = alpha / (alpha + beta) and the variance (of Y) is  mu(1-mu)(1+(N-1)rho)/N. Here, the correlation rho is given by 1/(1 + alpha + beta) and is the correlation between the N individuals within a litter. A litter effect is typically reflected by a positive value of rho. It is known as the over-dispersion parameter.
默认的模式是eta1 =logit(mu)和eta2 = logit(rho),因为这两个参数介于0和1。平均(Y)p = mu = alpha / (alpha + beta)和方差(Y)mu(1-mu)(1+(N-1)rho)/N。 ,相关rho的1/(1 + alpha + beta)是的N内的枯枝落叶的个人之间的相关性。一胎效果典型地反映为正值的rho。这是被称为过度分散参数。

This family function uses Fisher scoring. Elements of the second-order expected derivatives with respect to alpha and  beta are computed numerically, which may  fail for large alpha, beta,  N or else take a long time.
此的家庭功能使用费舍尔得分。元素的的二阶预期的衍生工具方面的alpha和beta数值计算,它可能会失败,大alpha,beta,N或其他需要很长的时间。


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

An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm.
类的一个对象"vglmff"(见vglmff-class)。该对象被用于建模功能如vglm。

Suppose fit is a fitted beta-binomial model. Then fit@y contains the sample proportions y, fitted(fit) returns estimates of E(Y), and weights(fit, type="prior") returns the number of trials N.
假设fit是一个装有β-二项式模型。然后fit@y包含的样本比例y,fitted(fit)E(Y)和weights(fit, type="prior")回报的估计返回的试验次数N。


警告----------Warning ----------

If the estimated rho parameter is close to zero then it pays to try lrho = "rhobit". One day this may become the default link function.
如果估计的rho沸石参数是接近于零,则它支付给尝试lrho = "rhobit"。有一天,这可能会成为默认链接的功能。

This family function is prone to numerical difficulties due to the expected information matrices not being positive-definite or ill-conditioned over some regions of the parameter space. If problems occur try setting irho to some numerical value, nsimEIM = 100, say, or else use etastart argument of vglm, etc.
这间家庭功能很容易由于预期的信息矩阵是正定的或病态的,在一些区域的参数空间的数值困难。如果出现问题,尝试设置irho一些数值,nsimEIM = 100,或者说其他人使用etastart参数vglm,等


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

This function processes the input in the same way as binomialff. But it does not handle  the case N=1 very well because there are two parameters to estimate, not one, for each row of the input. Cases where N=1 can be omitted via the  subset argument of vglm.
此函数处理的输入相同的方式binomialff。但它不处理的情况下N=1非常好,因为有两个参数估计,而不是一个,每行的输入。其中N=1可以通过subset的vglm参数省略的情况。

The extended beta-binomial distribution of Prentice (1986) is currently not implemented in the VGAM package as it has range-restrictions for the correlation parameter that are currently too difficult to handle in this package. However, try lrho = "rhobit".
普伦蒂斯(1986)扩展的β-二项分布目前尚未实现在VGAM包,因为它有范围限制的相关参数,目前也很难处理这个包。然而,尝试lrho = "rhobit"。


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


T. W. Yee



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

Robust estimation of the variance in moment methods for extra-binomial and extra-Poisson variation. Biometrics, 47, 383–401.
Binary regression using an extended beta-binomial distribution, with discussion of correlation induced by covariate measurement errors. Journal of the American Statistical Association, 81, 321–327.

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

betabinomial.ab, Betabinom, binomialff, betaff, dirmultinomial, lirat.
betabinomial.ab,Betabinom,binomialff,betaff,dirmultinomial,lirat。


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


# Example 1[例1]
bdata = data.frame(N = 10, mu = 0.5, rho = 0.8)
bdata = transform(bdata,
                  y = rbetabinom(n=100, size = N, prob = mu, rho = rho))
fit = vglm(cbind(y, N-y) ~ 1, betabinomial, bdata, trace = TRUE)
coef(fit, matrix = TRUE)
Coef(fit)
head(cbind(fit@y, weights(fit, type = "prior")))


# Example 2[例2]
fit = vglm(cbind(R, N-R) ~ 1, betabinomial, lirat,
           trace = TRUE, subset = N > 1)
coef(fit, matrix = TRUE)
Coef(fit)
t(fitted(fit))
t(fit@y)
t(weights(fit, type = "prior"))


# Example 3, which is more complicated[实施例3中,这是更复杂的]
lirat = transform(lirat, fgrp = factor(grp))
summary(lirat)   # Only 5 litters in group 3[第3组只有5窝]
fit2 = vglm(cbind(R, N-R) ~ fgrp + hb, betabinomial(zero = 2),
           data = lirat, trace = TRUE, subset = N > 1)
coef(fit2, matrix = TRUE)
## Not run:  with(lirat, plot(hb[N > 1], fit2@misc$rho,[#不运行:(lirat,图(HB [N> 1],FIT2万方$ RHO,]
                 xlab = "Hemoglobin", ylab = "Estimated rho",
                 pch = as.character(grp[N > 1]), col = grp[N > 1]))
## End(Not run)[#(不执行)]
## Not run:  # cf. Figure 3 of Moore and Tsiatis (1991)[#不运行:#比照。图3 Moore和Tsiatis的(1991)]
with(lirat, plot(hb, R / N, pch = as.character(grp), col = grp, las = 1,
                 xlab = "Hemoglobin level", ylab = "Proportion Dead",
                 main = "Fitted values (lines)"))
smalldf = with(lirat, lirat[N > 1, ])
for(gp in 1:4) {
    xx = with(smalldf, hb[grp == gp])
    yy = with(smalldf, fitted(fit2)[grp == gp])
    ooo = order(xx)
    lines(xx[ooo], yy[ooo], col = gp) }
## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 23:50 , Processed in 0.032927 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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