lines.survfit(survival)
lines.survfit()所属R语言包:survival
Add Lines or Points to a Survival Plot
添加线条或点生存图
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Often used to add the expected survival curve(s) to a Kaplan-Meier plot generated with plot.survfit.
经常被用来添加到Kaplan-Meier生存曲线与plot.survfit产生预期的生存曲线(S)。
用法----------Usage----------
## S3 method for class 'survfit'
lines(x, type="s", mark=3, col=1, lty=1,
lwd=1, mark.time=TRUE,
xscale=1, firstx=0, firsty=1, xmax, fun, conf.int=FALSE, ...)
## S3 method for class 'survfit'
points(x, xscale, xmax, fun, ...)
参数----------Arguments----------
参数:x
a survival object, generated from the survfit or survexp functions.
一个生存的对象,生成survfit或survexp功能。
参数:type
the line type, as described in lines. The default is a step function for survfit objects, and a connected line for survexp objects.
线路类型,描述lines。默认为survfit对象,步骤,功能和survexp对象的连接线。
参数:mark, col, lty, lwd
vectors giving the mark symbol, color, line type and line width for the added curves.
向量给予的标记符号,颜色,线条类型,线宽增加曲线。
参数:...
other graphical parameters
其他图形参数
参数:mark.time
controls the labeling of the curves. If FALSE, no labeling is done. If TRUE, then curves are marked at each censoring time. If mark.time is a numeric vector, then curves are marked at the specified time points.
控制曲线的标签。如果FALSE做,没有标签。如果TRUE,然后曲线标记在每个审查时间。如果mark.time是一个数值向量,然后曲线在指定的时间点标记。
参数:xscale
a number used to divide the x values. If time was originally in days, a value of 365.25 would give a plotted scale in years.
用于划分的x值的数字。如果时间最初是在天,一个价值365.25会给多年绘制的规模。
参数:firstx, firsty
the starting point for the survival curves. If either of these is set to NA or < blank > the plot will start at the first time point of the curve.
生存曲线的起点。如果这些设置NA或<空白>的图将在第一时间点的曲线开始。
参数:xmax
the maximum horizontal plot coordinate. This shortens the curve before plotting it, so unlike using the xlim graphical parameter, warning messages about out of bounds points are not generated.
协调的最高水平的图。这缩短之前绘制的曲线,所以不像使用xlim图形参数,并警告不会产生出界点的消息。
参数:fun
an arbitrary function defining a transformation of the survival curve. For example fun=log is an alternative way to draw a log-survival curve (but with the axis labeled with log(S) values). Four often used transformations can be specified with a character argument instead: "log" is the same as using the log=T option, "event" plots cumulative events (f(y) = 1-y), "cumhaz" plots the cumulative hazard function (f(y) = -log(y)) and "cloglog" creates a complimentary log-log survival plot (f(y) = log(-log(y) along with log scale for the x-axis).
任意函数定义的生存曲线改造。例如fun=log是一种替代的方式提请日志的生存曲线(但日志()值标记的轴)。可以指定四个经常使用的转换,而不是一个字符参数:“日志”使用log=T选项,“事件”的图累计事件(F(Y)= 1-Y)是相同的,“ cumhaz“图的累积风险函数(F(Y)=日志(Y))和”cloglog“创建一个免费的日志记录生存图(F(Y)=日志(日志与日志规模(Y) X-轴)。
参数:conf.int
if TRUE, confidence bands for the curves are also plotted. If set to "only", then only the CI bands are plotted, and the curve itself is left off. This can be useful for fine control over the colors or line types of a plot.
如果TRUE,还绘制曲线的置信带。如果设置为"only",那么只有在CI频段绘制,曲线本身不放过。这可能是有用的精细控制在颜色或线类型的图。
值----------Value----------
a list with components x and y, containing the coordinates of the last point on each of the curves (but not of the confidence limits). This may be useful for labeling.
一个组件列表x和y,包含曲线(但不置信限)的最后一个点的坐标。这可能是有用的标签。
副作用----------Side Effects----------
one or more curves are added to the current plot.
一个或多个曲线添加到当前的图。
参见----------See Also----------
lines, par, plot.survfit, survfit, survexp.
lines,par,plot.survfit,survfit,survexp。
举例----------Examples----------
fit <- survfit(Surv(time, status==2) ~ sex, pbc,subset=1:312)
plot(fit, mark.time=FALSE, xscale=365.25,
xlab='Years', ylab='Survival')
lines(fit[1], lwd=2, xscale=365.24) #darken the first curve and add marks[变暗的第一条曲线和附加标志]
# Add expected survival curves for the two groups,[加入两组预期的生存曲线,]
# based on the US census data[根据美国人口普查数据]
# The data set does not have entry date, use the midpoint of the study[数据集没有入境之日起,使用研究的中点]
efit <- survexp(~ ratetable(sex=sex,age=age*365.35,year=as.Date('1979/1/1')) +
sex, data=pbc, times=(0:24)*182)
temp <- lines(efit, lty=2, xscale=365.24, lwd=2:1)
text(temp, c("Male", "Female"), adj= -.1) #labels just past the ends[刚刚过去的两端的标签]
title(main="Primary Biliary Cirrhosis, Observed and Expected")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|