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

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

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

                                         Gamma-Ordinal Link Function
                                         γ-有序链接功能

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

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

Computes the gamma-ordinal transformation, including its inverse and the first two derivatives.
计算γ-序的转换,包括逆和前两个衍生物。


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


golf(theta, earg = list(lambda = 1), inverse = FALSE, deriv = 0,
     short = TRUE, tag = FALSE)



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

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


参数:earg
Extra argument for passing in additional information. This must be list with component lambda. Here, lambda is the shape parameter in gamma2. A component in the list called cutpoint is optional; if omitted then cutpoint is ignored from the GOLF definition. If given, the cutpoints should be non-negative integers. If golf() is used as the link function in cumulative then, if the cutpoints are known, then one should choose reverse = TRUE, parallel = TRUE, intercept.apply = TRUE. If the cutpoints are unknown, then choose reverse = TRUE, parallel = TRUE, intercept.apply = FALSE.  
额外的信息传递额外的参数。这必须是列表与组件lambda。在这里,lambda的形状参数gamma2。一个组件列表中的名为cutpoint是可选的,如果省略,则cutpoint被忽略的GOLF定义。如果给定的分割点应该是所有非负整数。如果golf()cumulative为纽带功能,那么,如果切点是已知的,那么我们应该选择reverse = TRUE, parallel = TRUE, intercept.apply = TRUE。如果分割点是未知的,然后选择reverse = TRUE, parallel = TRUE, intercept.apply = FALSE。


参数: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 gamma-ordinal link function (GOLF) can be applied to a  parameter lying in the unit interval. Its purpose is to link cumulative probabilities associated with an ordinal response coming from an underlying 2-parameter gamma distribution.
γ-序链路功能(高尔夫)可以应用到趴在单位时间间隔的参数。它的目的是要连结与序响应来自一个基本的双参数伽玛分布的累积概率。

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

See Links for general information about VGAM link functions.
见LinksVGAM链接功能的一般信息,。


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

See Yee (2012) for details.
的详细信息,请参阅仪(2012)。


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

Prediction may not work on vglm or  vgam etc. objects if this link function is used.
预测vglm或vgam的对象,如果使用这个链接功能可能无法正常工作。


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

Numerical values of theta too close to 0 or 1 or out of range result in large positive or negative values, or maybe 0 depending on the arguments. Although measures have been taken to handle cases where theta is too close to 1 or 0, numerical instabilities may still arise.
数值theta太接近为0或1,或者在大的正的或负的值的范围的结果,或也许0根据参数的不同。虽然已采取措施,处理情况下,theta是太接近1或0,数值不稳定性仍可能出现。

In terms of the threshold approach with cumulative probabilities for an ordinal response this link function corresponds to the gamma distribution (see gamma2) that has been recorded as an ordinal response using known cutpoints.
在阈值的做法,累积概率为序响应这个链接功能对应的伽玛分布(gamma2),已被记录为一个有序的响应,用已知的分割点。


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


Thomas W. Yee



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

Ordinal ordination with normalizing link functions for count data,  (in preparation).

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

Links, gamma2, polf, nbolf, cumulative.
Links,gamma2,polf,nbolf,cumulative。


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


earg = list(lambda = 1)
golf("p", earg = earg, short = FALSE)
golf("p", earg = earg, tag = TRUE)

p = seq(0.02, 0.98, len = 201)
y = golf(p, earg = earg)
y. = golf(p, earg = earg, deriv = 1)
max(abs(golf(y, earg = earg, inv = TRUE) - p)) # Should be 0[应为0]

## Not run: [#不运行:]
par(mfrow=c(2,1), las = 1)
plot(p, y, type = "l", col = "blue", main = "golf()")
abline(h=0, v=0.5, col = "red", lty = "dashed")

plot(p, y., type = "l", col = "blue",
     main = "(Reciprocal of) first GOLF derivative")

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


# Another example[另一个例子]
gdata = data.frame(x2 = sort(runif(nn <- 1000)))
gdata = transform(gdata, x3 = runif(nn))
gdata = transform(gdata, mymu = exp( 3 + 1 * x2 - 2 * x3))
lambda = 4
gdata = transform(gdata, y1 = rgamma(nn, shape=lambda, scale=mymu/lambda))
cutpoints = c(-Inf, 10, 20, Inf)
gdata = transform(gdata, cuty = Cut(y1, breaks=cutpoints))
## Not run: [#不运行:]
par(mfrow=c(1,1), las = 1)
with(gdata, plot(x2, x3, col=cuty, pch=as.character(cuty)))
## End(Not run)[#(不执行)]
with(gdata, table(cuty) / sum(table(cuty)))
fit = vglm(cuty ~ x2 + x3, fam = cumulative(link = "golf",
           reverse = TRUE, parallel = TRUE, intercept.apply = TRUE,
           mv = TRUE, earg = list(cutpoint=cutpoints[2:3], lambda=lambda)),
           gdata, trace = TRUE)
head(fit@y)
head(fitted(fit))
head(predict(fit))
coef(fit)
coef(fit, matrix = TRUE)
constraints(fit)
fit@misc$earg

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


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

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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