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

R语言:survfit.coxph()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 18:16:41 | 显示全部楼层 |阅读模式
survfit.coxph(survival)
survfit.coxph()所属R语言包:survival

                                         Compute a Survival Curve from a Cox model
                                         从Cox模型计算出的生存曲线

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

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

Computes the predicted survivor function for a Cox proportional  hazards model.
计算的Cox比例风险模型预测的幸存者功能。


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


## S3 method for class 'coxph'
survfit(formula, newdata,
        se.fit=TRUE, conf.int=.95,
        individual=FALSE,
        type,vartype,
        conf.type=c("log","log-log","plain","none"), censor=TRUE, id, ...)



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

参数:formula
A coxph object.   
一个coxph对象。


参数:newdata
a data frame with the same variable names as those that appear  in the coxph formula.  It is also valid to use a vector, if the data frame would consist of a single row.  The curve(s) produced will be representative of a cohort whose  covariates correspond to the values in newdata.  Default is the mean of the covariates used in the  coxph fit.   
与那些出现在coxph公式相同的变量名的数据框。它也是有效的使用向量,如果数据框将组成一个单一的行。生产曲线(S)将代表一个世代的协变量对应newdata值。默认coxph适合使用的协变量的均值。


参数:individual
a logical value indicating whether each row of newdata represents a distinct individual (FALSE, the default),  or if each row of the data frame represents different  time epochs for only one individual (TRUE).   In the former case the result will have one curve for each row in newdata, in the latter only a single curve will be produced.  
一个逻辑值,指示是否每行newdata代表一个独特的个体(假,默认),或如果数据框的每一行代表不同的时间只有一个人(TRUE),时代。在前者情况下,其结果将有一个排每个newdata,后者只有一个单一的曲线将产生的曲线。


参数:conf.int
the level for a two-sided confidence interval on the survival curve(s).  Default is 0.95.   
双面置信区间上的生存曲线(S)的水平。默认值是0.95。


参数:se.fit
a logical value indicating whether standard errors should be  computed.  Default is TRUE.   
一个逻辑值,该值指示是否应计算标准误差。默认TRUE。


参数:type,vartype
a character string specifying the type of survival curve.  Possible values are  "aalen", "efron", or "kalbfleish-prentice"  (only the first two characters are necessary).  The default is to match the computation used in the Cox model. The Nelson-Aalen-Breslow estimate for ties='breslow', the Efron estimate for ties='efron' and the Kalbfleisch-Prentice estimate for a discrete time model ties='exact'. Variance estimates are the Aalen-Link-Tsiatis, Efron, and Greenwood. The default will be the Efron estimate for ties='efron' and the Aalen estimate otherwise.      
一个字符串指定的存活曲线类型。可能的值是"aalen","efron"或"kalbfleish-prentice"(只有前两个字符是必要的)。默认匹配Cox模型中所使用的计算。纳尔逊 - 阿伦,布瑞斯罗夫估计ties='breslow'埃弗龙,ties='efron'和徒弟估计离散时间模型ties='exact'Kalbfleisch的估计。方差估计的阿伦链接Tsiatis,埃弗龙,格林伍德。默认将埃弗龙ties='efron'估计,否则阿伦估计。


参数:conf.type
One of "none", "plain", "log" (the default), or "log-log".  Only enough of the string to uniquely identify it is necessary. The first option causes confidence intervals not to be generated.  The second causes the standard intervals curve +- k *se(curve), where k is determined from conf.int.  The log option calculates intervals based on the cumulative hazard or log(survival). The last option bases intervals on the log hazard or log(-log(survival)).   
一"none","plain","log"(默认),或"log-log"。只有足够的字符串唯一标识,这是必要的。第一个选项导致不能生成的置信区间。第二个导致标准的间隔curve +- k *se(curve),其中K是从conf.int决定。日志选项计算基于累积性危害或日志(生存)的时间间隔。最后一个选项基地间隔日志危害或日志(日志(生存))。


参数:censor
if FALSE time points at which there are no events (only censoring) are not included in the result.
如果结果不包括在虚假的时间点,在其中有没有事件(只审查)。


参数:id
optional vector of subject identifiers, see below.
可选的主题标识符向量,见下文。


参数:...
for future methods
未来的方法


Details

详情----------Details----------

Serious thought has been given to removing the "default" for newdata, since the resulting curve(s) almost never make sense. It remains due to the unwarranted attachment to the option shown by other packages and by users.  Two particularly egregious examples are factor variables and interactions.  Suppose one were studying interspecies transmission of a virus, and the data set has a factor variable with levels ("pig", "chicken") and about equal numbers of observations for each.  The “mean” covariate level will be 1/2 – is this a flying pig?  As to interactions assume data with sex coded as 0/1, ages ranging from 50 to 80, and a model with age*sex.  The “mean” value for the age:sex interaction term will be about 30, a value that does not occur in the data.
认真思考已消除newdata,因为由此产生的曲线(S)几乎从来没有意义的“默认”。它仍然是由于无端连接到其他用户的包和显示选项。两个特别令人震惊的例子因素变量和相互作用。假设一个学习间的病毒传播,和数据集与水平(“猪”,“鸡”)和有关意见的人数相等,每个因素变量。 “中庸”协水平将有1/2  - 这是一个飞行的猪?以互动假设数据编码为0/1与性别,年龄从50到80不等,与年龄*性别的典范。 “平均”年龄值:性别互动的任期将是约30,一个值,不会发生数据。

Users are strongly advised to use the newdata argument.  Note that this data set needs to contain values for the main effects but not for any interaction terms.
我们强烈建议用户使用newdata参数。请注意,这组数据需要包含值的主要影响,但没有任何互动条款。

When the original model contained time-dependent covariates, then the path of that covariate through time needs to be specified in order to obtain a predicted curve. This requires newdata to contain multiple lines for each hypothetical subject which gives the covariate values, time interval, and strata for each line (a subject can change strata). If newdata consists of a single patient then the individual=TRUE argument can be used to signal that all the lines are for one subject.  If there are multiple prediction subjects an id must be added which demarks which rows go to each. The time interval must have the same (start, stop, status) variables as the original model: although the status variable is not used and thus can be set to a dummy value of 0 or 1, it is necessary for the variables to be recognized as a Surv object. Last, although predictions with a time-dependent covariate path can be useful, it is very easy to create a prediction that is senseless.  Users are encouraged to seek out a text that discusses the issue in detail.
当原始模型中随时间变化的协变量,然后通过时间,协需要指定路径以获得预测的曲线。这就要求newdata每一个假设的问题,给出了协变量的值,时间间隔,每行(一个主体可以改变地层)地层中包含多个行。 newdata如果然后由individual=TRUE参数可用于信号,所有的行是一个主题,一个病人。如果有多个预测科目id必须添加哪些demarks行去每个。时间间隔必须有原始模型相同的变量(启动,停止状态):虽然不使用状态变量,因此可以设置为0或1的虚拟价值,这是必要的,被确认为变量作为Surv对象。最后,虽然时间依赖性协路径的预测可能是有用的,它是很容易的创建一个预测是毫无意义的。鼓励用户正在寻求文本,详细论述了问题。

When all the coefficients are zero, the Kalbfleisch-Prentice estimator reduces to the Kaplan-Meier, the Aalen estimate to the exponential of Nelson's cumulative hazard estimate, and the Efron estimate to the Fleming-Harrington estimate of survival. The variances of the curves from a Cox model are larger, however, due to the variance of the coefficients.
当所有的系数均为零,Kalbfleisch徒弟估计减少的Kaplan-Meier,阿伦估计尼尔森的累积风险估计指数,弗莱明以质量求生存,哈灵顿估计埃弗龙估计。从Cox模型曲线的差异较大,但是,由于变异系数。

See survfit for more details about the counts (number of events, number at risk, etc.)
看到survfit计数(事件,风险等)的更多细节

The censor argument was fixed at FALSE in earlier versions of the code and not made  available to the user. The default argument is sensible in most instances — and causes the familiar + sign to appear on plots — it is not sensible for time dependent covariates since they lead to a large number of spurious marks.
检查员参数是固定FALSE在早期版本的代码,而不是向用户提供。默认参数在大多数情况下,明智的 - 并导致熟悉的+签名出现上图 - 时间依赖协变量是不理智的,因为它们会导致大量的虚假标记。


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

an object of class "survfit".   See survfit.object for  details. Methods defined for survfit objects are   print, plot,  lines, and points.
对象类"survfit"。看到survfit.object详情。 survfit对象定义的方法是print,plot,lines,points。


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

survival distribution in censored data.  Comm. in Statistics   13, 2469-86.
The Statistical Analysis of Failure Time Data. New York:Wiley.
function using Cox's proportional hazards model with   covariates.  Biometrics   40, 601-610.
Cox Model, Springer-Verlag.
for the integrated hazard function in Cox's regression  model for survival data. Annals of Statistics   9, 93-108.

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

print,   plot,   lines,    coxph,   Surv,   strata.   
print,plot,lines,coxph,Surv,strata。


举例----------Examples----------


#fit a Kaplan-Meier and plot it [适合Kaplan-Meier和绘制]
fit <- survfit(Surv(time, status) ~ x, data = aml)
plot(fit, lty = 2:3)
legend(100, .8, c("Maintained", "Nonmaintained"), lty = 2:3)

#fit a Cox proportional hazards model and plot the  [适合Cox比例风险模型和绘制]
#predicted survival for a 60 year old [一个60岁的预测生存]
fit <- coxph(Surv(futime, fustat) ~ age, data = ovarian)
plot(survfit(fit, newdata=data.frame(age=60)),
     xscale=365.25, xlab = "Years", ylab="Survival")

# Here is the data set from Turnbull[这里是从特恩布尔的数据集]
#  There are no interval censored subjects, only left-censored (status=3),[有没有区间科目,只剩审查(状态= 3),]
#  right-censored (status 0) and observed events (status 1)[右删失(状态0),并观察事件(状态1)]
#[]
#                             Time[时间]
#                         1    2   3   4[1 2 3 4]
# Type of observation[观察的类型]
#           death        12    6   2   3[死亡12 6 2 3]
#          losses         3    2   0   3[亏损3 2 0 3]
#      late entry         2    4   2   5[逾期报名2 4 2 5]
#[]
tdata <- data.frame(time  =c(1,1,1,2,2,2,3,3,3,4,4,4),
                    status=rep(c(1,0,2),4),
                    n     =c(12,3,2,6,2,4,2,0,2,3,3,5))
fit  <- survfit(Surv(time, time, status, type='interval') ~1,
              data=tdata, weight=n)

#[]
# Time to progression/death for patients with monoclonal gammopathy[单克隆丙种球蛋白的患者进展/死亡时间]
#  Competing risk curves (cumulative incidence)[竞争风险曲线(累积发病率)]
fit1 <- survfit(Surv(stop, event=='progression') ~1, data=mgus1,
                    subset=(start==0))
fit2 <- survfit(Surv(stop, status) ~1, data=mgus1,
                    subset=(start==0), etype=event) #competing risks[竞争风险]
# CI curves are always plotted from 0 upwards, rather than 1 down[CI曲线绘制从0向上,而不是1下]
plot(fit2, fun='event', xscale=365.25, xmax=7300, mark.time=FALSE,
            col=2:3, xlab="Years post diagnosis of MGUS")
lines(fit1, fun='event', xscale=365.25, xmax=7300, mark.time=FALSE,
            conf.int=FALSE)
text(10, .4, "Competing Risk: death", col=3)
text(16, .15,"Competing Risk: progression", col=2)
text(15, .30,"KM:prog")

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-23 12:02 , Processed in 0.026770 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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