groupkm(rms)
groupkm()所属R语言包:rms
Kaplan-Meier Estimates vs. a Continuous Variable
Kaplan-Meier估计与连续变量
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Function to divide x (e.g. age, or predicted survival at time u created by survest) into g quantile groups, get Kaplan-Meier estimates at time u (a scaler), and to return a matrix with columns x=mean x in quantile, n=number of subjects, events=no. events, and KM=K-M survival at time u, std.err = s.e. of -log K-M. Confidence intervals are based on -log S(t). Instead of supplying g, the user can supply the minimum number of subjects to have in the quantile group (m, default=50). If cuts is given (e.g. cuts=c(0,.1,.2,...,.9,.1)), it overrides m and g. Calls Therneau's survfitKM in the survival package to get Kaplan-Meiers estimates and standard errors.
功能划分x(如年龄,或预测生存时间u创建的survest)到g位数组,Kaplan-Meier估计在u (缩放),并返回一个矩阵的列x=x中位数,n=多个科目,events=。事件,和KM= KM生存时间u,std.err= SE的logK-M。 -log的S(t)的基础上的置信区间。而是提供g,用户可以提供的最低人数的受试者中位数组(m,默认值= 50)。 cuts如果给定的(如:cuts=c(0,.1,.2,...,.9,.1)),它覆盖m和g。调用Therneau的survfitKMsurvival包的Kaplan-Meiers的估算和标准错误。
用法----------Usage----------
groupkm(x, Srv, m=50, g, cuts, u,
pl=FALSE, loglog=FALSE, conf.int=.95, xlab, ylab,
lty=1, add=FALSE, cex.subtitle=.7, ...)
参数----------Arguments----------
参数:x
variable to stratify
变量进行分层
参数:Srv
a "Surv" object - n x 2 matrix containing survival time and event/censoring 1/0 indicator. Units of measurement come from the "units" attribute of the survival time variable. "Day" is the default.
一个“幸存者”对象 - NX 2基质中含有的生存时间和事件/审查1/0指标。计量单位从“单位人”的生存时间变量的属性。 “日”是默认的。
参数:m
desired minimum number of observations in a group
所需的最小数量的基团中的观察
参数:g
number of quantile groups
位数组的数量
参数:cuts
actual cuts in x, e.g. c(0,1,2) to use [0,1), [1,2].
实际削减的x,例如c(0,1,2)使用[0,1),[1,2]。
参数:u
time for which to estimate survival
估计生存时间
参数:pl
TRUE to plot results
TRUE图示结果
参数:loglog
set to TRUE to plot log(-log(survival)) instead of survival
设置为TRUE绘制log(-log(survival)),而不是生存
参数:conf.int
defaults to .95 for 0.95 confidence bars. Set to FALSE to suppress bars.
默认为.95为0.95的信心条形。设置为FALSE抑制条形。
参数:xlab
if pl=TRUE, is x-axis label. Default is label(x) or name of calling argument
如果pl=TRUE,X轴标签。默认值是label(x)或名称的调用参数
参数:ylab
if pl=TRUE, is y-axis label. Default is constructed from u and time units attribute.
如果pl=TRUE,Y轴标签。 u和时间units属性的默认构造。
参数:lty
line time for primary line connecting estimates
主线路连接的估计行时间
参数:add
set to TRUE if adding to an existing plot
设置为TRUE,如果加入到现有的图
参数:cex.subtitle
character size for subtitle. Default is .7. Use FALSE to suppress subtitle.
字幕的字符大小。默认是.7。使用FALSE抑制字幕。
参数:...
plotting parameters to pass to the plot and errbar functions
绘图参数传递给的图和errbar功能
值----------Value----------
matrix with columns named x (mean predictor value in interval), n (sample size in interval), events (number of events in interval), KM (Kaplan-Meier estimate), std.err (standard error of -log KM)
矩阵的列名为x(平均预测值在间隔),n(样本大小间隔),events(事件的时间间隔),KM(卡普兰, Meier估计值),std.err(标准错误logKM)
参见----------See Also----------
survfit, errbar, cut2, Surv, units
survfit,errbar,cut2,Surv,units
实例----------Examples----------
n <- 1000
set.seed(731)
age <- 50 + 12*rnorm(n)
cens <- 15*runif(n)
h <- .02*exp(.04*(age-50))
d.time <- -log(runif(n))/h
label(d.time) <- 'Follow-up Time'
e <- ifelse(d.time <= cens,1,0)
d.time <- pmin(d.time, cens)
units(d.time) <- "Year"
groupkm(age, Surv(d.time, e), g=10, u=5, pl=TRUE)
#Plot 5-year K-M survival estimates and 0.95 confidence bars by [图的5年KM生存的估计和0.95信心条形,]
#decile of age. If omit g=10, will have >= 50 obs./group.[等分的年龄。如果省略G = 10,> = 50的OBS /组。]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|