predict.coxph(survival)
predict.coxph()所属R语言包:survival
Predictions for a Cox model
在Cox模型预测
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Compute fitted values and regression terms for a model fitted by coxph
计算安装coxph的模型拟合值和回归方面
用法----------Usage----------
## S3 method for class 'coxph'
predict(object, newdata,
type=c("lp", "risk", "expected", "terms"),
se.fit=FALSE, na.action=na.pass, terms=names(object$assign), collapse,
reference=c("strata", "sample"), ...)
参数----------Arguments----------
参数:object
the results of a coxph fit.
一个coxph合适的结果。
参数:newdata
Optional new data at which to do predictions. If absent predictions are for the data frame used in the original fit.
择新数据做预测。如果缺席的预测是在原来的适合使用的数据框。
参数:type
the type of predicted value. Choices are the linear predictor ("lp"), the risk score exp(lp) ("risk"), the expected number of events given the covariates and follow-up time ("expected"), and the terms of the linear predictor ("terms").
预测值的类型。选择是线性预测("lp"),风险得分EXP(LP)("risk"),给予协变量的事件的预期和后续时间("expected"),线性预测("terms")。
参数:se.fit
if TRUE, pointwise standard errors are produced for the predictions.
如果为TRUE,逐点的标准误差产生的预测。
参数:na.action
applies only when the newdata argument is present, and defines the missing value action for the new data. The default is to include all observations.
只适用于newdata的说法是存在的,并定义为新的数据缺失值的行动。默认的是包括所有的意见。
参数:terms
if type="terms", this argument can be used to specify which terms should be included; the default is all.
如果type =“条款”,这种说法可以用来指定应包括哪些方面;默认是全部。
参数:collapse
optional vector of subject identifiers. If specified, the output will contain one entry per subject rather than one entry per observation.
可选向量的主题标识符。如果指定,输出将包含一个条目,而不是每科每一个观察项。
参数:reference
reference for centering predictions
围绕预测的参考
参数:...
For future methods
对于未来的方法
Details
详情----------Details----------
The Cox model is a relative risk model; predictions of type "linear predictor", "risk", and "terms" are all relative to the sample from which they came. By default, the reference value for each of these is the mean covariate within strata. The primary underlying reason is statistical: a Cox model only predicts relative risks between pairs of subjects within the same strata, and hence the addition of a constant to any covariate, either overall or only within a particular stratum, has no effect on the fitted results. Using the reference="strata" option causes this to be true for predictions as well.
Cox模型是一个相对的风险模型;类型为“线性预测”,“风险”,“条款”的预测都是相对的样品从他们来到。默认情况下,这些参考值是在地层平均共变数。首要的根本原因是统计的Cox模型预测之间对同一地层内的科目相对风险,因此除了常量的任何协,无论是整体或只在一个特定的阶层,有没有对拟合结果的影响。使用reference="strata"选项,导致这是真实以及用于预测。
When the results of predict are used in further calculations it may be desirable to use a fixed reference level. Use of reference="sample" will use the overall means, and agrees with the linear.predictors component of the coxph object (which uses the overall mean for backwards compatability with older code).
当predict结果用于进一步的计算,它可能需要使用一个固定的参考水平。 reference="sample"将使用整体手段的使用,和同意linear.predictors的coxph对象组件(使用旧代码向后兼容性的整体平均)。
Predictions of type "expected" incorportate the baseline hazard and are thus absolute instead of relative; the reference option has no effect on these.
类型预测“预计”incorportate的基线危险,因此绝对而不是相对reference选项没有这些效果。
值----------Value----------
a vector or matrix of predictions, or a list containing the predictions (element "fit") and their standard errors (element "se.fit") if the se.fit option is TRUE.
一个向量或矩阵的预测,或一个列表,其中包含的预测(“适合”元素)和他们的标准误差(元素“se.fit”),如果se.fit选项为TRUE。
参见----------See Also----------
predict,coxph,termplot
predict,coxph,termplot
举例----------Examples----------
fit <- coxph(Surv(time, status) ~ age + ph.ecog + strata(inst), lung)
mresid <- lung$status - predict(fit, type='expected') #Martingale resid [鞅渣油]
predict(fit,type="lp")
predict(fit,type="expected")
predict(fit,type="risk",se.fit=TRUE)
predict(fit,type="terms",se.fit=TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|