score2proba(survcomp)
score2proba()所属R语言包:survcomp
Function to compute the survival probabilities from a risk score
从风险得分函数来计算生存概率
译者:生物统计家园网 机器人LoveR
描述----------Description----------
the function uses either a Cox model or the product-limit estimator to compute the survival probabilities from a risk score for a specific point in time.
该函数使用一个Cox模型或产品的限制从风险评分计算在特定时间点的生存概率的估计。
用法----------Usage----------
score2proba(data.tr, score, yr, method = c("cox", "prodlim"),
conf.int = 0.95, which.est= c ("point", "lower", "upper"))
参数----------Arguments----------
参数:data.tr
the data frame for the training set. This data frame must contain three columns for the times, the event occurrence and the risk score. These columns are called "time", "event" and "score" respectively
训练集的数据框。这个数据框必须包含三列的时代,事件的发生和风险得分。这些列被称为“时间”,“事件”和“得分”
参数:score
risk score for the test set
风险评分为测试集
参数:yr
a point in time for which the survival probabilities must be computed
必须计算为一个时间点的生存概率
参数:method
method for survival probabilities estimation, either cox or prodlim for the Cox model or the product-limit estimator, respectively
生存概率的估计方法,要么cox或prodlimCox模型或产品的限制估计,分别
参数:conf.int
value in [0,1]. Default at 0.95
值在[0,1]。默认为0.95
参数:which.est
which estimation to be returned? point for the point estimate, lower for the lower bound and upper for the upper bound
估计要返回? point点估计,lower下限和upper上限
值----------Value----------
vector of predicted survival probabilities
矢量预测生存概率
作者(S)----------Author(s)----------
Benjamin Haibe-Kains
参考文献----------References----------
<h3>See Also</h3>
举例----------Examples----------
set.seed(12345)
age <- rnorm(30, 50, 10)
stime <- rexp(30)
cens <- runif(30,.5,2)
sevent <- as.numeric(stime <= cens)
stime <- pmin(stime, cens)
dd <- data.frame("time"=stime, "event"=sevent, "score"=age)
#Cox's model[Cox模型]
score2proba(data.tr=dd, score=dd$score, yr=1, method="cox")
#product-limit estimator[产品限估计]
score2proba(data.tr=dd, score=dd$score, yr=1, method="prodlim")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|