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

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

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

                                         Censored Poisson Family Function
                                         定数截尾泊松家庭功能

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

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

Family function for a censored Poisson response.
家庭功能的审查泊松响应。


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


cenpoisson(link = "loge", earg = list(), imu = NULL)



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

参数:link, earg
Link function and its extra argument applied to the mean. See Links for more choices.  
Link功能和额外的参数的平均。见Links更多的选择。


参数:imu
Optional initial value. See CommonVGAMffArguments for more information.  
可选的初始值。见CommonVGAMffArguments更多信息。


Details

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

Often a table of Poisson counts has an entry J+ meaning >= J. This family function is similar to poissonff but handles such censored data. The input requires SurvS4. Only a univariate response is allowed. The Newton-Raphson algorithm is used.
通常情况下,泊松计数表项j +意义>= J。这间家庭功能是类似poissonff的,但处理这样的删失数据。输入需要SurvS4。只有一个单变量的反应是允许的。使用Newton-Raphson算法。


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

As the response is discrete, care is required with Surv, especially with "interval" censored data because of the (start, end] format. See the examples below. The examples have y < L as left censored and y >= U (formatted as U+) as right censored observations, therefore L <= y <  U is for uncensored and/or interval censored observations. Consequently the input must be tweaked to conform to the (start, end] format.
的反应是离散的,需要与Surv,尤其是与"interval"删失数据,因为(start, end]格式。请参见下面的例子。的例子有y < L离开了审查,y >= U(格式化为U+)右删失的观测值,因此L <= y <  U是未经审查和/或区间的观测。因此,必须进行调整,输入符合(start, end]格式的。


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

The function poissonff should be used when there are no censored observations. Also, NAs are not permitted with SurvS4, nor is type = "counting".
的功能poissonff时,应使用有没有审查意见。此外,NA的是,不允许与SurvS4,也不是是type = "counting"。


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


Thomas W. Yee



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



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

SurvS4, poissonff, Links.
SurvS4,poissonff,Links。


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


# Example 1: right censored data[例1:右删失数据]
set.seed(123); U = 20
cdata = data.frame(y = rpois(N <- 100, exp(3)))
cdata = transform(cdata, cy = pmin(U, y),
                         rcensored = (y >= U))
cdata = transform(cdata, status = ifelse(rcensored, 0, 1))
with(cdata, table(cy))
with(cdata, table(rcensored))
with(cdata, table(ii &lt;- print(SurvS4(cy, status)))) # Check; U+ means &gt;= U[检查; U +手段> = U]
fit = vglm(SurvS4(cy, status) ~ 1, cenpoisson, cdata, trace = TRUE)
coef(fit, matrix = TRUE)
table(print(depvar(fit))) # Another check; U+ means &gt;= U[另取U +手段> = U]


# Example 2: left censored data[例2:左删失数据]
L = 15
cdata = transform(cdata, cY = pmax(L, y),
                         lcensored = y &lt;  L) # Note y &lt; L, not cY == L or y &lt;= L[注意:Y <L,不是CY == L或y <= L]
cdata = transform(cdata, status = ifelse(lcensored, 0, 1))
with(cdata, table(cY))
with(cdata, table(lcensored))
with(cdata, table(ii &lt;- print(SurvS4(cY, status, type = "left"))))  # Check[查]
fit = vglm(SurvS4(cY, status, type = "left") ~ 1, cenpoisson, cdata, trace = TRUE)
coef(fit, matrix = TRUE)


# Example 3: interval censored data[例3:区间数据]
cdata = transform(cdata, Lvec = rep(L, len = N),
                         Uvec = rep(U, len = N))
cdata = transform(cdata, icensored = Lvec &lt;= y &amp; y &lt; Uvec) # Not lcensored or rcensored[不lcensored或rcensored]
with(cdata, table(icensored))
cdata = transform(cdata, status = rep(3, N))       # 3 means interval censored[3表示区间]
cdata = transform(cdata, status = ifelse(rcensored, 0, status)) # 0 means right censored[0表示右删失]
cdata = transform(cdata, status = ifelse(lcensored, 2, status)) # 2 means left  censored[2表示左审查]
# Have to adjust Lvec and Uvec because of the (start, end] format:[有中调整Lvec和Uvec(起点,终点]格式:]
cdata$Lvec[with(cdata, icensored)] = cdata$Lvec[with(cdata, icensored)] - 1
cdata$Uvec[with(cdata, icensored)] = cdata$Uvec[with(cdata, icensored)] - 1
cdata$Lvec[with(cdata, lcensored)] = cdata$Lvec[with(cdata, lcensored)] # Unchanged[不变]
cdata$Lvec[with(cdata, rcensored)] = cdata$Uvec[with(cdata, rcensored)] # Unchanged[不变]
with(cdata, table(ii &lt;- print(SurvS4(Lvec, Uvec, status, type = "interval")))) # Check[查]

fit = vglm(SurvS4(Lvec, Uvec, status, type = "interval") ~ 1,
           cenpoisson, cdata, trace = TRUE)
coef(fit, matrix = TRUE)
table(print(depvar(fit)))  # Another check[另取]


# Example 4: Add in some uncensored observations[例4:在一些未经审查的意见]
index = (1:N)[with(cdata, icensored)]
index = head(index, 4)
cdata$status[index] = 1 # actual or uncensored value[实际或未经审查的价值]
cdata$Lvec[index] = cdata$y[index]
with(cdata, table(ii <- print(SurvS4(Lvec, Uvec, status,
                                     type = "interval")))) # Check[查]

fit = vglm(SurvS4(Lvec, Uvec, status, type = "interval") ~ 1,
           cenpoisson, cdata, trace = TRUE, crit = "c")
coef(fit, matrix = TRUE)
table(print(depvar(fit)))  # Another check[另取]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 22:25 , Processed in 0.023968 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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