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

R语言 rms包 ie.setup()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-27 19:11:26 | 显示全部楼层 |阅读模式
ie.setup(rms)
ie.setup()所属R语言包:rms

                                        Intervening Event Setup
                                         介入事件设置

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

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

Creates several new variables which help set up a dataset for modeling with cph or coxph when there is a single binary time-dependent covariable which turns on at a given time, and stays on.  This is typical when analyzing the impact of an intervening event. ie.setup creates a Surv object using the start time, stop time format.  It also creates a binary indicator for the intervening event, and a variable called subs that is useful when attach-ing a dataframe. subs has observation numbers duplicated for subjects having an intervening event, so those subject's baseline covariables (that are not time-dependent) can be duplicated correctly.
创建帮助建立一个数据集建模与cph或coxph是一个二进制随时间变化的协变量,打开在一个给定的时间,并保持几个新的变量。的中间事件的影响进行分析时,这是一个典型的。 ie.setup创建一个Surv对象使用的开始时间,停止时间格式。它还创建一个二进制指示器的事件,一个变量称为subs这是有用的,当attach一个数据框。 subs观察重复的为具有插入事件的主题,所以这些对象的基线协变量(即不随时间变化的)可以被复制正确的数字。


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


ie.setup(failure.time, event, ie.time, break.ties=FALSE)



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

参数:failure.time
a numeric variable containing the event or censoring times for the terminating event  
一个数字变量,包含事件或审查时间的终止事件


参数:event
a binary (0/1) variable specifying whether observations had the terminating event (event=1) or were censored (event=0)  
一个二进制(0/1)变量指定的观察是否有终止事件(EVENT = 1),或审查(事件= 0)


参数:ie.time
intervening event times.  For subjects having no intervening events, the corresponding values of ie.time must be NA.  
干预事件的时间。对于具有中间没有事件的主题,相应的值的ie.time必须是NA。


参数:break.ties
Occasionally intervening events are recorded as happening at exactly the same time as the termination of follow-up for some subjects. The Surv function will not allow this.  To randomly break the ties by subtracting a random number from such tied intervening event times, specify break.ties=TRUE.  The random number is uniform between zero and the minimum difference between any two untied failure.times.  </table>
偶尔干预事件的后续部分科目的终止发生在完全相同的时间记录。 Surv函数不允许这样做。随机打破关系,这样的随机数减去捆绑干预事件的时间,请指定break.ties=TRUE。是均匀的随机数之间的零和解开failure.time的任何两个之间的最小差值。 </ TABLE>


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

a list with components S, ie.status, subs, reps.  S is a Surv object containing start and stop times for intervals of observation,  along with event indicators.  ie.status is one if the intervening event has occurred at the start of the interval, zero otherwise. subs is a vector of subscripts that can be used to replicate other variables the same way S was replicated.  reps specifies how many times each original observation was replicated.  S, ie.status, subs are all the same length (at least the number of rows for S is) and are longer than the original failure.time vector. reps is the same length as the original failure.time vector. The subs vector is suitable for passing to validate.lrm or calibrate, which pass this vector under the name cluster on to predab.resample so that bootstrapping can be done by sampling with replacement from the original subjects rather than from the individual records created by ie.setup.
组件的列表与S, ie.status, subs, reps。 S是一个Surv对象包含启动和停止时间间隔的观察,随着事件的指标。 ie.status是1,如果其间的事件已发生的间隔开始时,否则为零。 subs是一个向量的下标,可以用来复制其他变量相同的方式S被复制。 reps指定复制多少次,每次观察。 S, ie.status, subs都是相同的长度(至少为S)的行数,并且长于原始failure.time矢量。 reps是原始failure.time矢量的长度相同。 subs向量是适合传递给validate.lrm或calibrate,通过这个向量的名称clusterpredab.resample所以该引导程序可以通过采样从原来的议题,而不是从个人记录的ie.setup更换。


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



Frank Harrell<br>
Department of Biostatistics<br>
Vanderbilt University<br>
f.harrell@vanderbilt.edu




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

cph, coxph, Surv, cr.setup, predab.resample
cph,coxph,Surv,cr.setup,predab.resample


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


failure.time <- c(1 ,   2,   3)
event        <- c(1 ,   1,   0)
ie.time      <- c(NA, 1.5, 2.5)

z <- ie.setup(failure.time, event, ie.time)
S <- z$S
S
ie.status <- z$ie.status
ie.status
z$subs
z$reps
## Not run: [#不运行:]
attach(input.data.frame[z$subs,])   #replicates all variables[复制所有变量]
f <- cph(S ~ age + sex + ie.status)
# Instead of duplicating rows of data frame, could do this:[而不是重复行的数据框,可以这样做:]
attach(input.data.frame)
z <- ie.setup(failure.time, event, ie.time)
s <- z$subs
age <- age[s]
sex <- sex[s]
f <- cph(S ~ age + sex + ie.status)

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

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-24 12:06 , Processed in 0.028150 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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