predict.survreg(survival)
predict.survreg()所属R语言包:survival
Predicted Values for a ‘survreg’ Object
预测值对象“survreg”
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Predicted values for a survreg object
预测值的survreg对象
用法----------Usage----------
## S3 method for class 'survreg'
predict(object, newdata,
type=c("response", "link", "lp", "linear", "terms", "quantile",
"uquantile"),
se.fit=FALSE, terms=NULL, p=c(0.1, 0.9), na.action=na.pass, ...)
参数----------Arguments----------
参数:object
result of a model fit using the survreg function.
survreg使用函数的模型拟合的结果。
参数:newdata
data for prediction. If absent predictions are for the subjects used in the original fit.
用于预测的数据。如果不存在预测的科目在原来的配合使用。
参数:type
the type of predicted value. This can be on the original scale of the data (response), the linear predictor ("linear", with "lp" as an allowed abbreviation), a predicted quantile on the original scale of the data ("quantile"), a quantile on the linear predictor scale ("uquantile"), or the matrix of terms for the linear predictor ("terms"). At this time "link" and linear predictor ("lp") are identical.
的预测值的类型。这可以在原有规模的数据(响应),线性预测("linear","lp"允许的缩写),在原有规模的数据(预测位数<X >),分位数的线性预测规模("quantile"),或矩阵的线性预测的术语("uquantile")。在这个时候"terms"和线性预测("link")是相同的。
参数:se.fit
if TRUE, include the standard errors of the prediction in the result.
如果TRUE,包括预测结果的标准误差。
参数:terms
subset of terms. The default for residual type "terms" is a matrix with one column for every term (excluding the intercept) in the model.
术语的子集。默认情况下,残留的类型"terms"是一个矩阵,每学期(不包括截距)模型中的一列。
参数:p
vector of percentiles. This is used only for quantile predictions.
矢量百分位数。这仅用于分量预测。
参数: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参数是存在的,定义了新的数据缺失值的行动。默认值是包括所有意见。
参数:...
for future methods
未来的方法
值----------Value----------
a vector or matrix of predicted values.
的预测值的向量或矩阵。
参考文献----------References----------
censored data. Biometrics, 48, 507-528.
参见----------See Also----------
survreg, residuals.survreg
survreg,residuals.survreg
实例----------Examples----------
# Draw figure 1 from Escobar and Meeker[埃斯科瓦尔和米克绘制图1]
fit <- survreg(Surv(time,status) ~ age + age^2, data=stanford2,
dist='lognormal')
plot(stanford2$age, stanford2$time, xlab='Age', ylab='Days',
xlim=c(0,65), ylim=c(.01, 10^6), log='y')
pred <- predict(fit, newdata=list(age=1:65), type='quantile',
p=c(.1, .5, .9))
matlines(1:65, pred, lty=c(2,1,2), col=1)
# Predicted Weibull survival curve for a lung cancer subject with[肺癌主题与预测的威布尔生存曲线]
# ECOG score of 2[ECOG评分为2]
lfit <- survreg(Surv(time, status) ~ ph.ecog, data=lung)
pct <- 1:98/100 # The 100th percentile of predicted survival is at +infinity[0-10%的预测生存是无穷]
ptime <- predict(lfit, newdata=data.frame(ph.ecog=2), type='quantile',
p=pct, se=TRUE)
matplot(cbind(ptime$fit, ptime$fit + 2*ptime$se.fit,
ptime$fit - 2*ptime$se.fit)/30.5, 1-pct,
xlab="Months", ylab="Survival", type='l', lty=c(1,2,2), col=1)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|