partition.intervals(wild1)
partition.intervals()所属R语言包:wild1
Partition interval data into subintervals
成子区间的分区间隔数据
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Partitions temporal intervals or intervals on a number line into subintervals. If an event was associated with the original record for an individual prior to translation, it will be associated with the final record for the same individual after partitioning.
分区成子区间上号线的时间间隔或时间间隔。如果一个事件是与原纪录为个人在翻译之前,它会与最终的战绩为同一个人的分区后。
用法----------Usage----------
partition.intervals(first,last,breaks,recurrent=TRUE,labels=NULL,id=NULL,event=NULL,no.event=NULL)
参数----------Arguments----------
参数:first
A vector. First observation time for each individual.
一个向量。首先观察时间的每一个人。
参数:last
A vector. Last observation time for each individual.
一个向量。最新的观测时间的每一个人。
参数:breaks
A vector of breaks that define monitoring periods. Periods are open on the left and closed on the right.
一个向量定义监测期间的截断。期间在左侧禁区右侧。
参数:recurrent
If TRUE, the origin of each subinterval will be translated to 0 (very useful for creating survival records with recurrent origins)
如果TRUE,每个子区间的起源将被转换为0(为创建反复起源的生存记录非常有用的)
参数:labels
A vector of labels for monitoring periods. Length must be 1 less than the number of breakpoints.
的矢量监测期间的标签。长度必须小于断点的数量。
参数:id
A vector of individual identifiers for observations represented by first and last.
一个向量的个人识别码first和last代表的意见。
参数:event
Optional. Vector of outcomes for individuals. In survival analysis, this value indicates whether or not an event occurred.
可选。矢量成果的个人。在生存分析中,该值指示是否发生了一个事件。
参数:no.event
Value of event that indicates no event occurred. Required if and only if event is supplied.
event的值表示没有事件发生。当且仅当event提供必需的。
Details
详细信息----------Details----------
Typical use is for survival analysis, but may also be used for other types of data, e.g., to subdivide a transect line into segments that share a common origin.
典型的用途是生存分析,但也可以用于其他类型的数据,例如,共享一个共同的起源的成段细分样线。
值----------Value----------
Returns a data frame.
返回一个数据框。
(作者)----------Author(s)----------
Glen A. Sargeant<br>
U.S. Geological Survey<br>
Northern Prairie Wildlife Research Center<br>
<a href="mailto:glen_sargeant@usgs.gov">glen_sargeant@usgs.gov</a>
实例----------Examples----------
set.seed(1)
breaks <- seq(chron("1/1/2008","00:00:00"),by="years",length=3)
labels <- as.character(2008:2009)
diff(breaks)
first <- chron(runif(10,breaks[1],breaks[2]))
last <- chron(runif(10,first,breaks[3]))
event <- rbinom(10,1,0.5)
data.frame(first,last,event)
not.recur <- partition.intervals(first=first,last=last,breaks=breaks,recurrent=FALSE,labels=labels)
recur <- partition.intervals(first=first,last=last,breaks=breaks,labels=labels,
event=event,no.event=0)
cbind(not.recur,recur)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|