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

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

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

                                        Link functions for VGLM/VGAM/etc. families
                                         链接功能为VGLM / VGAM /等。家庭

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

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

The VGAM package provides a number of (parameter) link functions which are described in general here. Collectively, they offer the user considerable flexibility for modelling data.
VGAM包提供了一个数(参数)一般在这里所描述的链接功能。总的来说,他们为用户提供了很大的灵活性建模数据。


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


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



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

参数:theta
Numeric or character. Actually this can be theta (default) or eta, depending on the other arguments. If theta is character then inverse and  deriv are ignored.  
数字或字符。其实,这是theta(默认)或eta,根据其他参数。如果theta是字符,然后inverse和deriv会被忽略。


参数:earg
List. Extra argument allowing for additional information, specific to the link function.  For example, for logoff, this will contain the offset value.  The argument earg is always a list with named components. See each specific link function to find the component names for the list.  Almost all VGAM family functions with a single link function have an argument (often called earg) which will allow parameters to be inputted for that link function. For VGAM family functions with more than one link function there usually will be an earg-type argument for each link. For example, if there are two links called lshape and lscale then  the earg-type arguments for these might be called eshape and escale, say.  
列表。额外的参数,允许更多的信息,特定的纽带作用。例如,logoff,这将包含的偏移值。的参数earg总是由指定组件的列表。请参阅每个特定的链接功能的组件名称的列表。几乎所有的VGAM家庭功能与一个单一的连接功能,这将使链接功能,将输入的参数一个参数(通常被称为earg)。对于VGAM的家庭功能与一个以上的连接功能,通常会是一个earg类型的参数的每一个环节。例如,如果有两个链接称为lshape和lscaleearg类型的参数,这些可能会被称为eshape和escale,说。


参数:inverse
Logical. If TRUE the inverse link value theta is returned, hence the argument theta is really eta.  
逻辑。如果TRUE的反向链接的价值theta返回,因此theta的说法是真的eta。


参数:deriv
Integer. Either 0, 1, or 2 specifying the order of the derivative.  
整数。无论是0,1,或2指定的衍生物的顺序。


参数:short, tag
Logical. Used for labelling the blurb slot of a vglmff-class object. Used only if theta is character, and gives the formula for the link in character form. If tag = TRUE then the result contains a little more information.  
逻辑。用于标签blurb插槽的vglmff-class对象。 theta如果是字符,字符形式,并给出了公式的链接。如果tag = TRUE那么结果中包含了一些信息。


Details

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

Almost all VGAM link functions have something similar to the argument list as given above. That is, there is a matching earg for each link argument. In this help file we have eta = g(theta) where g is the link function, theta is the parameter and eta is the linear/additive predictor.
几乎所有的VGAM的链接功能有类似的东西上面给出的参数列表。也就是说,有一个匹配earg每一个link参数。在本帮助文件中,我们有eta = g(theta)其中g的链接功能,theta是参数和eta是线性/对添加剂的预测。

The following is a brief enumeration of all VGAM link functions.
以下是一个简单枚举所有VGAM链接功能。

For parameters lying between 0 and 1 (e.g., probabilities): logit, probit, cloglog, cauchit, fsqrt, logc, golf, polf, nbolf.
趴在0和1之间(例如,概率)的参数:logit,probit,cloglog,cauchit,fsqrt,logc, golf,polf,nbolf。

For positive parameters (i.e., greater than 0): loge, nloge, powl.
对于正参数(即大于0):loge,nloge,powl。

For parameters greater than 1: loglog.
对于参数大于1:loglog。

For parameters between -1 and 1: fisherz, rhobit.
对参数之间-1和1:fisherz,rhobit。

For parameters between A and B: elogit, logoff (B = Inf).
的参数之间A和B:elogit,logoff(B = Inf)。

For unrestricted parameters (i.e., any value): identity, nidentity, reciprocal, nreciprocal.
无限制的参数(即,任意值):identity,nidentity,reciprocal,nreciprocal。


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

Returns one of the link function value or its first or second derivative, the inverse link or its first or second derivative, or a character description of the link.
返回的的链接函数值或它的第一个或第二个衍生的,反向链路其第一或第二的衍生工具,或一个字符的链接的描述。

Here are the general details. If inverse = FALSE and deriv = 0 (default) then the ordinary link function eta = g(theta) is returned. If inverse = FALSE and deriv = 1 then it is d theta / d eta  as a function of theta. If inverse = FALSE and deriv = 2 then it is d^2 theta / d eta^2 as a function of theta.
下面是一些常见的细节。如果inverse = FALSE和deriv = 0(默认值),然后普通链接函数eta = g(theta)返回。如果inverse = FALSE和deriv = 1是d theta / d eta的函数theta。如果inverse = FALSE和deriv = 2是d^2 theta / d eta^2的函数theta。

If inverse = TRUE and deriv = 0 then the inverse link function is returned, hence theta is really eta. If inverse = TRUE and deriv is positive then the  reciprocal of the same link function with (theta = theta, earg = earg, inverse = TRUE, deriv = deriv) is returned.
如果inverse = TRUE和deriv = 0然后逆联接函数返回,因此theta是真的eta的。如果inverse = TRUE和deriv是正的,那么倒数(theta = theta, earg = earg, inverse = TRUE, deriv = deriv)返回相同的链接功能。


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

VGAM link functions are generally not compatible with other functions outside the package. In particular, they won't work with glm or any other package for fitting GAMs.
VGAM的链接功能,通常是不兼容的包以外的其他功能。特别是,他们将无法与glm或任何其他程序包安装GAMS。

From October 2006 onwards, all VGAM family functions will only contain one default value for each link argument rather than giving a vector of choices. For example, rather than  binomialff(link = c("logit", "probit", "cloglog",   "cauchit", "identity"), ...) it is now binomialff(link = "logit", ...) No checking will be done to see if the user's choice is reasonable. This means that the user can write his/her own VGAM link function and use it within any VGAM family function. Altogether this provides greater flexibility. The downside is that the user must specify the full name of the link function, by either assigning the link argument the full name as a character string, or just the name itself.  See the examples below.
从2006年10月起,所有VGAM的家庭功能将只包含一个默认的值的每一个环节参数,而不是一个向量的选择。例如,而不是binomialff(link = c("logit", "probit", "cloglog",   "cauchit", "identity"), ...)现在是binomialff(link = "logit", ...)将不检查,看看用户的选择是合理的。这意味着,用户可以编写他/她自己的VGAM链接功能,并用它在任何VGAM家庭功能。总之,这提供了更大的灵活性。不足之处是,用户必须指定完整名称的链接功能,通过指定的链接参数的全名作为一个字符串,或者仅仅是名称本身。请参见下面的例子。


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


T. W. Yee



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

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

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

TypicalVGAMfamilyFunction, vglm, vgam, rrvglm. cqo, cao, uqo.
TypicalVGAMfamilyFunction,vglm,vgam,rrvglm。 cqo,cao,uqo。


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


logit("a")
logit("a", short = FALSE)
logit("a", short = FALSE, tag = TRUE)

logoff(1:5, earg = list(offset = 1))  # Same as log(1:5 + 1)[同为log(1:5 + 1)]
powl(1:5, earg = list(power = 2))     # Same as (1:5)^2[相同(1:5)^ 2]

fit1 <- vgam(agaaus ~ altitude, binomialff(link = cloglog), hunua)    # ok[行]
fit2 <- vgam(agaaus ~ altitude, binomialff(link = "cloglog"), hunua)  # ok[行]

## Not run: [#不运行:]
# This no longer works since "clog" is not a valid VGAM link function:[这不再是“堵塞”的作品,是不是一个有效的VGAM链接功能:]
fit3 <- vgam(agaaus ~ altitude, binomialff(link = "clog"), hunua) # not ok[不能确定]


# No matter what the link, the estimated var-cov matrix is the same[无论在什么环节,估计VAR-CoV的矩阵是一样的]
y <- rbeta(n = 1000, shape1 = exp(0), shape2 = exp(1))
fit1 <- vglm(y ~ 1, beta.ab(lshape1 = "identity", lshape2 = "identity"),
             trace = TRUE, crit = "c")
fit2 <- vglm(y ~ 1, beta.ab(lshape1 = logoff, eshape1 = list(offset = 1.1),
                            lshape2 = logoff, eshape2 = list(offset = 1.1)),
            trace = TRUE, crit = "c")
vcov(fit1, untran = TRUE)
vcov(fit1, untran = TRUE) - vcov(fit2, untran = TRUE)  # Should be all 0s[应该是全0]
fit1@misc$earg   # No 'special' parameters[没有特殊参数]
fit2@misc$earg   # Some 'special' parameters are here[一些“特别”的参数在这里]


par(mfrow = c(2,2))
p <- seq(0.01, 0.99, len = 200)
x <- seq(-4, 4, len = 200)
plot(p, logit(p), type = "l", col = "blue")
plot(x, logit(x, inverse = TRUE), type = "l", col = "blue")
plot(p, logit(p, deriv = 1), type = "l", col = "blue") # reciprocal![倒数!]
plot(p, logit(p, deriv = 2), type = "l", col = "blue") # reciprocal![倒数!]

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

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 17:00 , Processed in 0.034192 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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