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

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

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

                                         Logit Link Function
                                         Logit模型链接功能

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

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

Computes the logit transformation, including its inverse and the first two derivatives.
计算的的罗吉特改造,包括逆和前两个衍生物。


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


logit(theta, earg = list(), inverse = FALSE, deriv = 0,
      short = TRUE, tag = FALSE)
elogit(theta, earg = list(min = 0, max = 1), 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. Similarly, for elogit, values of theta less than or equal to A or greater than or equal to B can be replaced  by the bminvalue and bmaxvalue components of the list earg.       For elogit, earg should be a list with components min giving A,  max giving B, and for out of range values,  bminvalue and bmaxvalue. If earg is used, these component names should not be abbreviated.  
可选列表。额外的信息传递额外的参数。 theta的值是小于或等于0时,可以代替由bvalue组件的列表earg计算链接函数值之前。 theta是大于或等于1的值,可以由1代替减去bvalue组件列表earg之前计算的链接函数值。组件名称bvalue的意思是“边界值”。见Links的一般信息,关于earg。类似地,对于elogit,theta小于或等于A或大于或等于B可以取代bminvalue和<值X>的组件列表bmaxvalue。对于earg,elogit应该是一个列表的组件earg给min,A在max,超出范围的数值, B和bminvalue。如果bmaxvalue使用,这些组件的名称应该是不能省略的。


参数:inverse
Logical. If TRUE the inverse function is computed. The inverse logit function is known as the expit function.  
逻辑。如果TRUE的逆函数计算。逆罗吉特函数已知作为expit函数。


参数: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 logit link function is very 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.
logit的关联函数是非常常用的参数,趴在单位的时间间隔。数值theta接近0或1或范围的结果Inf,-Inf,NA或NaN。

The extended logit link function elogit should be used more generally for parameters that lie in the interval (A,B), say. The formula is
扩展logit的关联函数elogit应更普遍使用的时间间隔(A,B),说说谎的参数。其计算公式为

and the default values for A and B correspond to the ordinary logit function. Numerical values of theta close to A or B or out of range result in Inf, -Inf, NA or NaN.  However these can be replaced by values bminvalue and bmaxvalue first before computing the link function.
的默认值A和B对应于普通罗吉特功能,。数值thetaA或B或范围Inf,-Inf,NA或NaN 。然而,这些可替换值bminvalue和bmaxvalue之前先计算的链接功能。

The arguments short and tag are used only if theta is character.
的参数short和tag只有theta是字符。


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

For logit with deriv = 0, the logit of theta, i.e., log(theta/(1-theta)) when inverse = FALSE, and if inverse = TRUE then exp(theta)/(1+exp(theta)).
对于logitderiv = 0“logit的theta,即,log(theta/(1-theta))inverse = FALSE,并如果inverse = TRUEexp(theta)/(1+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 (for logit), or close to A or B for elogit. One way of overcoming this is to use earg.
当theta是数值不稳定,可能会出现接近1或0(logit),或接近A或Belogit。克服这一点的方法之一是使用earg。

In terms of the threshold approach with cumulative probabilities for an ordinal response this link function corresponds to the univariate logistic distribution (see logistic).
在序响应这个连接功能对应的单因素logistic分布的累积概率的阈值方法(见logistic)。


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


Thomas W. Yee



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

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

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

Links, probit, cloglog, cauchit, logistic1, loge.
Links,probit,cloglog,cauchit,logistic1,loge。


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


p = seq(0.01, 0.99, by = 0.01)
logit(p)
max(abs(logit(logit(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))
logit(p)  # Has NAs[有来港定居]
logit(p, earg = list(bvalue =  .Machine$double.eps))  # Has no NAs[有没有来港定居]

p = seq(0.9, 2.2, by = 0.1)
elogit(p, earg = list(min = 1, max = 2,
                    bminvalue = 1 + .Machine$double.eps,
                    bmaxvalue = 2 - .Machine$double.eps))  # Has no NAs[有没有来港定居]

## Not run:  par(mfrow = c(2,2), lwd = (mylwd &lt;- 2))[#不跑杆(mfrow = C(2,2),随钻测井(mylwd < -  2))]
y = seq(-4, 4, length = 100)
p = seq(0.01, 0.99, by = 0.01)
for(d in 0:1) {
  matplot(p, cbind(logit(p, deriv = d), probit(p, deriv = d)),
          type = "n", col = "purple", ylab = "transformation", las = 1,
          main = if (d ==  0) "Some probability link functions"
          else "First derivative")
  lines(p,   logit(p, deriv = d), col = "limegreen")
  lines(p,  probit(p, deriv = d), col = "purple")
  lines(p, cloglog(p, deriv = d), col = "chocolate")
  lines(p, cauchit(p, deriv = d), col = "tan")
  if (d ==  0) {
    abline(v = 0.5, h = 0, lty = "dashed")
    legend(0, 4.5, c("logit", "probit", "cloglog", "cauchit"),
           col = c("limegreen", "purple", "chocolate", "tan"), lwd = mylwd)
  } else
    abline(v = 0.5, lty = "dashed")
}

for(d in 0) {
  matplot(y, cbind(logit(y, deriv = d, inverse = TRUE),
                   probit(y, deriv = d, inverse = TRUE)), las = 1,
          type = "n", col = "purple", xlab = "transformation", ylab = "p",
          main = if (d ==  0) "Some inverse probability link functions"
          else "First derivative")
  lines(y,   logit(y, deriv = d, inverse = TRUE), col = "limegreen")
  lines(y,  probit(y, deriv = d, inverse = TRUE), col = "purple")
  lines(y, cloglog(y, deriv = d, inverse = TRUE), col = "chocolate")
  lines(y, cauchit(y, deriv = d, inverse = TRUE), col = "tan")
  if (d ==  0) {
    abline(h = 0.5, v = 0, lty = "dashed")
    legend(-4, 1, c("logit", "probit", "cloglog", "cauchit"),
           col = c("limegreen", "purple", "chocolate", "tan"), lwd = mylwd)
  }
}

p = seq(0.21, 0.59, by = 0.01)
plot(p, elogit(p, earg = list(min = 0.2, max = 0.6)),
     type = "l", col = "black", ylab = "transformation", xlim = c(0,1),
     las = 1, main = "elogit(p, earg = list(min = 0.2, max = 0.6)")
par(lwd = 1)

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

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 15:47 , Processed in 0.038355 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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