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

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

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

                                         Ordinal Poisson Family Function
                                         序泊松家庭功能

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

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

Fits a Poisson regression where the response is ordinal (the Poisson counts are grouped between known cutpoints).
符合泊松回归的反应是序数(泊松计数分组之间著名的切点)。


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


ordpoisson(cutpoints, countdata = FALSE, NOS = NULL,
           Levels = NULL, init.mu = NULL, parallel = FALSE,
           zero = NULL, link = "loge", earg = list())



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

参数:cutpoints
Numeric. The cutpoints, K_l. These must be non-negative integers. Inf values may be included. See below for further details.  
数字。分割点,K_l。这些都必须非负整数。 Inf的值可以被包括。请参阅下面进一步的细节。


参数:countdata
Logical. Is the response (LHS of formula) in count-data format? If not then the response is a matrix or vector with values 1, 2, ..., L, say, where L is the number of levels. Such input can be generated with cut with argument labels = FALSE.  If countdata = TRUE then the response is expected to be in the same format as fit@y where fit is a fitted model with ordpoisson as the VGAM family function. That is, the response is matrix of counts with L columns (if NOS = 1).  
逻辑。是在计数数据格式的响应(LHS式)?如果没有,则响应是一个矩阵或向量的值1,2,...,L说,其中L的水平是多少。这样的输入可以产生与cut与参数labels = FALSE。如果countdata = TRUE响应预计将在相同的格式fit@y其中fit与ordpoisson是一个合适的模型VGAM家庭功能。也就是说,响应矩阵的计数L列(如果NOS = 1“)。


参数:NOS
Integer. The number of species, or more generally, the number of response random variates. This argument must be specified when countdata = TRUE. Usually NOS = 1.  
整数。物种的数量,或更一般地,响应随机变数的数目。此参数时,必须指定countdata = TRUE。通常NOS = 1。


参数:Levels
Integer vector, recycled to length NOS if necessary. The number of levels for each response random variate. This argument should agree with cutpoints. This argument must be specified when countdata = TRUE.  
整数向量,回收长度NOS,如果必要的。每个响应的随机变量的数目水平。此参数应同意cutpoints。此参数时,必须指定countdata = TRUE。


参数:init.mu
Numeric. Initial values for the means of the Poisson regressions. Recycled to length NOS if necessary. Use this argument if the default initial values fail (the default is to compute an initial value internally).  
数字。初始值的泊松回归的手段。回收长度NOS,如果必要。使用此参数,默认的初始值失败(默认的是内部计算的初始值)。


参数:parallel, zero, link, earg
See poissonff.  
见poissonff。


Details

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

This VGAM family function uses maximum likelihood estimation (Fisher scoring) to fit a Poisson regression to each column of a matrix response. The data, however, is ordinal, and is obtained from known integer cutpoints. Here, l=1,&hellip;,L where L (L >= 2) is the number of levels. In more detail, let Y^*=l if K_{l-1} < Y     <= K_{l} where the K_l are the cutpoints. We have K_0=-Inf and K_L=Inf. The response for this family function corresponds to Y^* but we are really interested in the Poisson regression of Y.
这VGAM家庭功能,采用最大似然估计(Fisher评分),以适应的泊松回归到每列的矩阵响应。的数据,但是,序号,并从已知的整数分割点得到。在这里,l=1,&hellip;,L其中L(L >= 2)的水平是多少。在更多的细节,让Y^*=l如果K_{l-1} < Y     <= K_{l}其中K_l分割点。我们有K_0=-Inf和K_L=Inf。这间家庭功能的响应对应的Y^*“但我们真正感兴趣的泊松回归的Y。

If NOS=1 then the argument cutpoints is a vector (K_1,K_2,&hellip;,K_L) where the last value (Inf) is optional. If NOS>1 then the vector should have NOS-1 Inf values separating the cutpoints. For example, if there are NOS=3 responses, then something like ordpoisson(cut = c(0, 5, 10, Inf, 20, 30, Inf, 0, 10, 40, Inf)) is valid.
如果NOS=1的说法cutpoints是一个向量(K_1,K_2,&hellip;,K_L)其中的最后一个值(Inf)是可选的。如果NOS>1然后向量应该有NOS-1Inf值分离的分割点。例如,如果有NOS=3反应,然后像ordpoisson(cut = c(0, 5, 10, Inf, 20, 30, Inf, 0, 10, 40, Inf)),是有效的。


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


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

The input requires care as little to no checking is done. If fit is the fitted object, have a look at fit@extra and fit@y to check.
输入需要小心,因为几乎没有检查。如果fit是拟合对象,看看fit@extra和fit@y来检查。


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

Sometimes there are no observations between two cutpoints. If so, the arguments Levels and NOS need to be specified too. See below for an example.
有时候,有没有观测之间的分割点。如果是这样的话,参数Levels和NOS需要指定。请参阅下面的例子。


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


Thomas W. Yee



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

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

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

poissonff, polf, ordered.
poissonff,polf,ordered。


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


set.seed(123)     # Example 1[例1]
x2 = runif(n <- 1000); x3 = runif(n)
mymu = exp(3 - 1 * x2 + 2 * x3)
y1 = rpois(n, lambda = mymu)
cutpts = c(-Inf, 20, 30, Inf)
fcutpts = cutpts[is.finite(cutpts)]  # finite cutpoints[有限的切点]
ystar = cut(y1, breaks = cutpts, labels = FALSE)
## Not run: [#不运行:]
plot(x2, x3, col = ystar, pch = as.character(ystar))

## End(Not run)[#(不执行)]
table(ystar) / sum(table(ystar))
fit = vglm(ystar ~ x2 + x3, fam = ordpoisson(cutpoi = fcutpts))
head(fit@y)        # This can be input if countdata = TRUE[这可能是输入,如果countdata = TRUE]
head(fitted(fit))
head(predict(fit))
coef(fit, matrix = TRUE)
fit@extra

# Example 2: multivariate and there are no obsns between some cutpoints[实施例2:多元和有没有obsns一些分割点之间]
cutpts2 = c(-Inf, 0, 9, 10, 20, 70, 200, 201, Inf)
fcutpts2 = cutpts2[is.finite(cutpts2)]  # finite cutpoints[有限的切点]
y2 = rpois(n, lambda = mymu)   # Same model as y1[同样的模型为y1]
ystar2 = cut(y2, breaks = cutpts2, labels = FALSE)
table(ystar2) / sum(table(ystar2))
fit = vglm(cbind(ystar,ystar2) ~ x2 + x3, fam =
           ordpoisson(cutpoi = c(fcutpts,Inf,fcutpts2,Inf),
                      Levels = c(length(fcutpts)+1,length(fcutpts2)+1),
                      parallel = TRUE), trace = TRUE)
coef(fit, matrix = TRUE)
fit@extra
constraints(fit)
summary(fit@y)  # Some columns have all zeros[一些列有所有零]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 14:28 , Processed in 0.026166 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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