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

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

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

                                         Complementary Log-log Link Function
                                         互补登录log链接功能

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

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

Computes the complementary log-log transformation, including its inverse and the first two derivatives.
计算的互补双对数转换,包括逆和前两个衍生物。


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


cloglog(theta, earg = list(), inverse = FALSE, deriv = 0,
        short = TRUE, tag = FALSE)



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

参数:theta
Numeric or character. See below for further details.  
数字或字符。请参阅下面进一步的细节。


参数:earg
Optional list. Extra argument for passing in additional information. Values of theta which are less than or equal to 0 can be replaced by the bvalue component of the list earg before computing the link function value. Values of theta which are greater than or equal to 1 can be replaced by 1 minus the bvalue component of the list earg before computing the link function value. The component name bvalue stands for “boundary value”. See Links for general information about earg.  
可选列表。额外的信息传递额外的参数。 theta的值是小于或等于0时,可以代替由bvalue组件的列表earg计算链接函数值之前。 theta是大于或等于1的值,可以由1代替减去bvalue组件列表earg之前计算的链接函数值。组件名称bvalue的意思是“边界值”。见Links的一般信息,关于earg。


参数:inverse
Logical. If TRUE the inverse function is computed.  
逻辑。如果TRUE的逆函数计算。


参数:deriv
Order of the derivative. Integer with value 0, 1 or 2.  
订购的衍生工具。值0,1或2的整数,带。


参数:short
Used for labelling the blurb slot of a vglmff-class object.  
用于标签blurb插槽的vglmff-class对象。


参数:tag
Used for labelling the linear/additive predictor in the initialize slot of a vglmff-class object. Contains a little more information if TRUE.  
用于标注线性/对添加剂的预测在initialize插槽的vglmff-class对象。如果TRUE包含了一些信息。


Details

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

The complementary log-log link function is commonly used for parameters that lie in the unit interval.  Numerical values of theta close to 0 or 1 or out of range result in Inf, -Inf, NA or NaN.  The arguments short and tag are used only if theta is character.
互补loglog链接功能常用在于单位间隔的参数。数值theta接近0或1或范围的结果Inf,-Inf,NA或NaN。的参数short和tag只有theta是字符。


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

For deriv = 0, the complimentary log-log of theta, i.e., log(-log(1 - theta)) when inverse = FALSE, and if inverse = TRUE then 1-exp(-exp(theta)),.
对于deriv = 0,免费的log记录theta,即,log(-log(1 - theta))inverse = FALSE,并如果inverse = TRUE1-exp(-exp(theta))的。

For deriv = 1, then the function returns d theta / d eta as a function of theta if inverse = FALSE, else if inverse = TRUE then it returns the reciprocal.
对于deriv = 1,则该函数返回Dtheta / Deta的函数,theta如果inverse = FALSE如果inverse = TRUE然后它返回的倒数。

Here, all logarithms are natural logarithms, i.e., to base e.
在这里,所有的对数的自然对数,即,到碱基e。


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

Numerical instability may occur when theta is close to 1 or 0. One way of overcoming this is to use earg.
数值不稳定时可能会出现theta是接近1或0。克服这一点的方法之一是使用earg。

Changing 1s to 0s and 0s to 1s in the response means that effectively a loglog link is fitted. That is, tranform y by 1-y. That's why only one of cloglog and loglog is written.
改变1 0“和”0“中的”1“的响应,有效的loglog链接安装。也就是说,变换分析y1-y。这就是为什么只有一个cloglog和loglog写入。

With constrained ordination (e.g., cqo and cao) used with binomialff, a complementary log-log link function is preferred over the default logit link, for a good reason.  See the example below.
带约束的协调(例如,cqo和cao)一个互补的log,log链接功能用于与binomialff,优于默认logit链接,一个很好的理由。请看下面的例子。

In terms of the threshold approach with cumulative probabilities for an ordinal response this link function corresponds to the extreme value distribution.
此链接功能对应于极值分布的累积概率的阈值方法,在一个有序的响应。


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


Thomas W. Yee



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

Generalized Linear Models, 2nd ed. London: Chapman & Hall.

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

Links, logit, probit, cauchit.
Links,logit,probit,cauchit。


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


p = seq(0.01, 0.99, by=0.01)
cloglog(p)
max(abs(cloglog(cloglog(p), inverse=TRUE) - p)) # Should be 0[应为0]

p = c(seq(-0.02, 0.02, by=0.01), seq(0.97, 1.02, by=0.01))
cloglog(p)  # Has NAs[有来港定居]
cloglog(p, earg=list(bvalue= .Machine$double.eps))  # Has no NAs[有没有来港定居]

## Not run: [#不运行:]
p = seq(0.01, 0.99, by=0.01)
plot(p, logit(p), type="l", col="limegreen", ylab="transformation",
     lwd=2, las=1, main="Some probability link functions")
lines(p, probit(p), col="purple", lwd=2)
lines(p, cloglog(p), col="chocolate", lwd=2)
lines(p, cauchit(p), col="tan", lwd=2)
abline(v=0.5, h=0, lty="dashed")
legend(0.1, 4, c("logit", "probit", "cloglog", "cauchit"),
       col=c("limegreen","purple","chocolate", "tan"), lwd=2)

## End(Not run)[#(不执行)]

## Not run: [#不运行:]
# This example shows that a cloglog link is preferred over the logit[这个例子说明,一个cloglog链接优于logit的]
n = 500; p = 5; S = 3; Rank = 1  # Species packing model:[种包装规格型号:]
mydata = rcqo(n, p, S, EqualTol=TRUE, ESOpt=TRUE, EqualMax=TRUE,
              family="binomial", hiabundance=5, seed=123, Rank=Rank)
fitc = cqo(attr(mydata, "formula"), ITol=TRUE, data=mydata,
           fam=binomialff(mv=TRUE, link="cloglog"), Rank=Rank)
fitl = cqo(attr(mydata, "formula"), ITol=TRUE, data=mydata,
           fam=binomialff(mv=TRUE, link="logit"), Rank=Rank)

# Compare the fitted models (cols 1 and 3) with the truth (col 2)[用真情比较拟合模型(列1和3)(第2栏)]
cbind(ccoef(fitc), attr(mydata, "ccoefficients"), ccoef(fitl))

## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 20:24 , Processed in 0.024700 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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