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

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

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

                                         Exchangeable bivariate cloglog odds-ratio model from a
                                         可交换的二元cloglog胜算比模型从

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

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

Fits an exchangeable bivariate odds-ratio model to two binary responses with a complementary log-log link. The data are assumed to come from a zero-inflated Poisson distribution that has been converted to presence/absence.
两个二进制响应适合一个可交换的二元胜算比模型与互补的log,log的链接。的数据被假定来自一个零膨胀泊松分布,已被转换为存在/不存在。


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


zipebcom(lmu12 = "cloglog", lphi12 = "logit", loratio = "loge",
         emu12 = list(), ephi12 = list(), eoratio = list(),
         imu12 = NULL, iphi12 = NULL, ioratio = NULL,
         zero = 2:3, tol = 0.001, addRidge = 0.001)



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

参数:lmu12, emu12, imu12
Link function, extra argument and optional initial values for the first (and second) marginal probabilities. Arguments lmu12 and emu12 should be left alone. Argument imu12 may be of length 2 (one element for each response).  
Link功能,额外的参数和可选的初始值第一(第二)的边缘概率。参数lmu12和emu12应该被单独留在家中。参数imu12可能是长度为2(每个响应的一个元素)。


参数:lphi12
Link function applied to the phi parameter of the zero-inflated Poisson distribution (see zipoisson). See Links for more choices.  
Link功能施加到phi参数的零膨胀泊松分布(见zipoisson)。见Links更多的选择。


参数:loratio
Link function applied to the odds ratio. See Links for more choices.  
Link功能的比值比。见Links更多的选择。


参数:iphi12, ioratio
Optional initial values for phi and the odds ratio. See CommonVGAMffArguments for more details. In general, good initial values (especially for iphi12) are often required, therefore use these arguments if convergence failure occurs. If inputted, the value of iphi12 cannot be more than the sample proportions of zeros in either response.  
可选phi和的比值比初始值。见CommonVGAMffArguments更多详情。在一般情况下,良好的初始值(特别是对iphi12),因此往往需要使用这些参数,如果出现收敛失败。如果输入的值iphi12不能超过的零的样本比例在任一响应。


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


参数:zero
Which linear/additive predictor is modelled as an intercept only? A NULL means none. The default has both phi and the odds ratio as not being modelled as a function of the explanatory variables (apart from an intercept).  
其中线性/添加剂的预测中仅作为一个拦截模拟? ANULL是指没有。默认的同时具有phi和没有被建模作为解释变量的函数(除了从截距)的比值比。


参数:tol
Tolerance for testing independence. Should be some small positive numerical value.  
测试独立的公差。应该有一些小的正数值。


参数:addRidge
Some small positive numerical value. The first two diagonal elements of the working weight matrices are  multiplied by 1+addRidge to make it diagonally dominant, therefore positive-definite.  
一些小的正数值。的前两个工作的权重矩阵的对角线元素乘以由1+addRidge,使其对角占优,因此正极明确。


Details

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

This VGAM family function fits an exchangeable bivariate odds ratio model (binom2.or) with a cloglog link. The data are assumed to come from a zero-inflated Poisson (ZIP) distribution that has been converted to presence/absence. Explicitly, the default model is
这VGAM家庭功能,适合与一个binom2.or链接交换二元比值比模型(cloglog)。的数据被假定来自一个零膨胀泊松分布,已被转换为存在/不存在(ZIP)。明确地说,是默认的模型

for the (exchangeable) marginals, and
(可交换的)的勉强,和

for the mixing parameter, and
混合参数,并

specifies the dependency between the two responses. Here, the responses equal 1 for a success and a 0 for a failure, and the odds ratio is often written psi=p00 p11 / (p10 p01). We have p10 = p01 because of the exchangeability.
指定的两个响应之间的依赖关系。在这里,的反应等于1的失败是成功的,为0,其胜算比经常写psi=p00 p11 / (p10 p01)。我们有p10 = p01因为互换性。

The second linear/additive predictor models the phi parameter (see zipoisson). The third linear/additive predictor is the same as binom2.or, viz., the log odds ratio.
第二个线性/添加剂的预测模型的phi参数(见zipoisson)。第三线性/添加剂预测binom2.or,即,log比值比是相同的。

Suppose a dataset1 comes from a Poisson distribution that has been converted to presence/absence, and that both marginal probabilities are the same (exchangeable). Then binom2.or("cloglog", exch=TRUE) is appropriate. Now suppose a dataset2 comes from a zero-inflated Poisson distribution. The first linear/additive predictor of zipebcom() applied to dataset2 is the same as that of binom2.or("cloglog", exch=TRUE) applied to dataset1. That is, the phi has been taken care of by zipebcom() so that it is just like the simpler binom2.or.
假设一个数据集1来自一个泊松分布,已被转换为存在/不存在,并且,这两个边缘概率是相同的(可交换的)。然后binom2.or("cloglog", exch=TRUE)是合适的。现在,假设一个dataset2从零膨胀泊松分布。第一线性/添加剂预测zipebcom()施加到dataset2binom2.or("cloglog", exch=TRUE)施加到数据集是相同的。也就是说,phi已照顾的zipebcom()所以,它是一样简单的binom2.or。

Note that, for eta_1, mu12 = prob12 / (1-phi12) where prob12 is the probability of a 1 under the ZIP model. Here, mu12 correspond to mu1 and mu2 in the binom2.or-Poisson model.
需要注意的是,eta_1,mu12 = prob12 / (1-phi12)其中prob12是ZIP模式下的概率为1。在这里,mu12对应mu1和mu2中binom2.or-泊松模型。

If phi=0 then zipebcom() should be equivalent to binom2.or("cloglog", exch=TRUE). Full details are given in Yee and Dirnbock (2009).
如果phi=0然后zipebcom()应该是相当于binom2.or("cloglog", exch=TRUE)。详情中怡康和Dirnbock(2009)。

The leading 2 x 2 submatrix of the expected information matrix (EIM) is of rank-1, not 2! This is due to the fact that the parameters corresponding to the first two linear/additive predictors are unidentifiable. The quick fix around this problem is to use the addRidge adjustment. The model is fitted by maximum likelihood estimation since the full likelihood is specified. Fisher scoring is implemented.
2 x 2预期的信息的子矩阵的矩阵(EIM)是秩为1,而不是2!这是由于这样的事实,该参数对应的第一两个线性/添加剂预测因子的识辨。快速修复解决这个问题是使用addRidge调整。最大似然估计模型拟合以来的全部可能性。费舍尔得分的实施。

The default models eta2 and eta3 as single parameters only, but this can be circumvented by setting zero=NULL in order to model the  phi and odds ratio as a function of all the explanatory variables.
默认的模式eta2和eta3只作为单一参数,但是这可以通过设置规避zero=NULL为了模拟phi和赔率比所有的函数解释性变量。


值----------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。

When fitted, the fitted.values slot of the object contains the four joint probabilities, labelled as (Y1,Y2) = (0,0), (0,1), (1,0), (1,1), respectively. These estimated probabilities should be extracted with the fitted generic function.
嵌合时,fitted.values插槽的对象中包含的四个联合概率,标记为(Y1,Y2)=(0,0),(0,1),(1,0),(1,1)分别。这些估计的概率应提取的fitted通用功能。


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

The fact that the EIM is not of full rank may mean the model is naturally ill-conditioned. Not sure whether there are any negative consequences wrt theory. For now it is certainly safer to fit binom2.or to bivariate binary responses.
事实上,EIM是满秩的,可能意味着模型自然是病态的。不知道是否有任何负面影响WRT的理论。现在,它肯定是更安全的,以适应binom2.or二元二进制响应。


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

The "12" in the argument names reinforce the user about the exchangeability assumption. The name of this VGAM family function stands for zero-inflated Poisson exchangeable bivariate complementary log-log odds-ratio model or ZIP-EBCOM.
"12"的参数名,加强了用户的可交换性的假设。这VGAM家庭功能的名称代表零膨胀泊松交换二元互补双对数胜算比模型或ZIP-EBCOM的。

See binom2.or for details that are pertinent to this VGAM family function too. Even better initial values are usually needed here.
见binom2.or的详细信息,有关这VGAM家庭功能也。更妙的是初始值时,通常需要在这里。

The xij (see vglm.control) argument enables environmental variables with different values at the two time points to be entered into an exchangeable binom2.or model. See the author's webpage for sample code.
xij(见vglm.control)在两个时间点用不同的值将予订立的交换binom2.or模型参数使环境变量。请参阅作者的网页的示例代码。


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

Models for analysing species' presence/absence data at two time points. Journal of Theoretical Biology, 259(4), 684–694.

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

binom2.or, zipoisson, cloglog, CommonVGAMffArguments.
binom2.or,zipoisson,cloglog,CommonVGAMffArguments。


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


mydat = data.frame(x = seq(0, 1, len=(nsites <- 2000)))
mydat = transform(mydat, eta1 =  -3 + 5 * x,
                         phi1 = logit(-1, inverse=TRUE),
                         oratio = exp(2))
mydat = transform(mydat, mu12 = cloglog(eta1, inverse=TRUE) * (1-phi1))
tmat =  with(mydat, rbinom2.or(nsites, mu1=mu12, oratio=oratio, exch=TRUE))
mydat = transform(mydat, ybin1 = tmat[,1], ybin2 = tmat[,2])

with(mydat, table(ybin1,ybin2)) / nsites  # For interest only[仅利息]
## Not run: [#不运行:]
# Various plots of the data, for interest only[各小区的数据,仅利息]
par(mfrow = c(2, 2))
plot(jitter(ybin1) ~ x, data = mydat, col = "blue")

plot(jitter(ybin2) ~ jitter(ybin1), data = mydat, col = "blue")

plot(mu12 ~ x, data = mydat, col = "blue", type = "l", ylim = 0:1,
     ylab = "Probability", main = "Marginal probability and phi")
with(mydat, abline(h = phi1[1], col = "red", lty = "dashed"))

tmat2 = with(mydat, dbinom2.or(mu1 = mu12, oratio = oratio, exch = TRUE))
with(mydat, matplot(x, tmat2, col = 1:4, type = "l", ylim = 0:1,
     ylab = "Probability", main = "Joint probabilities"))
## End(Not run)[#(不执行)]

# Now fit the model to the data.[现在适合的数据模型。]
fit = vglm(cbind(ybin1,ybin2) ~ x, fam = zipebcom, dat = mydat, trace = TRUE)
coef(fit, matrix = TRUE)
summary(fit)
vcov(fit)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 09:38 , Processed in 0.024520 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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