validate.cph(rms)
validate.cph()所属R语言包:rms
Validation of a Fitted Cox or Parametric Survival Model's Indexes
验证一个装有考克斯或参数生存模型的索引
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This is the version of the validate function specific to models fitted with cph or psm.
这是版本的validate特定的功能的机型配备了cph或psm。
用法----------Usage----------
# fit <- cph(formula=Surv(ftime,event) ~ terms, x=TRUE, y=TRUE, \dots)
## S3 method for class 'cph'
validate(fit, method="boot", B=40, bw=FALSE, rule="aic", type="residual",
sls=.05, aics=0, force=NULL, pr=FALSE, dxy=FALSE, u, tol=1e-9, ...)
## S3 method for class 'psm'
validate(fit, method="boot",B=40,
bw=FALSE, rule="aic", type="residual", sls=.05, aics=0,
force=NULL,
pr=FALSE,
dxy=FALSE, tol=1e-12, rel.tolerance=1e-5, maxiter=15, ...)
参数----------Arguments----------
参数:fit
a fit derived cph. The options x=TRUE and y=TRUE must have been specified. If the model contains any stratification factors and dxy=TRUE, the options surv=TRUE and time.inc=u must also have been given, where u is the same value of u given to validate.
适合衍生cph。的选项x=TRUE和y=TRUE必须被指定。如果模型包含任何的分层因素和DXY = TRUE,选项surv=TRUE和time.inc=u也得到了,其中u是相同的值u给 validate。
参数:method
see validate
看到validate
参数:B
number of repetitions. For method="crossvalidation", is the number of groups of omitted observations.
重复的次数。对于method="crossvalidation",是省略观察组的数量。
参数:rel.tolerance,maxiter,bw
TRUE to do fast step-down using the fastbw function, for both the overall model and for each repetition. fastbw keeps parameters together that represent the same factor.
TRUE做快速降压使用fastbw功能,为整体模型和每个重复。 fastbw保持参数,表示相同的因素。
参数:rule
Applies if bw=TRUE. "aic" to use Akaike's information criterion as a stopping rule (i.e., a factor is deleted if the chi-square falls below twice its degrees of freedom), or "p" to use P-values.
参数:type
"residual" or "individual" - stopping rule is for individual factors or for the residual chi-square for all variables deleted
"residual"或"individual" - 停止规则是个人因素或残留的chi-square删除所有的变量
参数:sls
significance level for a factor to be kept in a model, or for judging the residual chi-square.
显着性水平保持在一个模型中的一个因素,或判断的剩余chi-square。
参数:aics
cutoff on AIC when rule="aic".
截止,AIC rule="aic"。
参数:force
see fastbw
看到fastbw
参数:pr
TRUE to print results of each repetition
TRUE每个重复打印结果
参数:tol,...
see validate or predab.resample
看到validate或predab.resample
参数:dxy
set to TRUE to validate Somers' Dxy using rcorr.cens, which takes longer.
设置为TRUE验证萨默斯Dxy使用rcorr.cens,这需要更长的时间。
参数:u
must be specified if the model has any stratification factors and dxy=TRUE. In that case, strata are not included in X beta and the survival curves may cross. Predictions at time t=u are correlated with observed survival times. Does not apply to validate.psm.
必须指定,如果模型有任何的分层因素和dxy=TRUE。在这种情况下,各阶层并不包含在X beta的生存曲线交叉。在时间的预测t=u与观察到的存活时间。不适用到validate.psm。
Details
详细信息----------Details----------
Statistics validated include the Nagelkerke R^2, Dxy, slope shrinkage, the discrimination index D [(model L.R. chi-square - 1)/L], the unreliability index U = (difference in -2 log likelihood between uncalibrated X beta and X beta with overall slope calibrated to test sample) / L, and the overall quality index Q = D - U. g is the g-index on the log relative hazard (linear predictor) scale. L is -2 log likelihood with beta=0. The "corrected" slope can be thought of as shrinkage factor that takes into account overfitting. See predab.resample for the list of resampling methods.
统计验证,包括NagelkerkeR^2,Dxy,斜坡收缩,歧视指数D [(型号LRchi-square - 1)/ L],不可靠指数<X未校准的>=(-2对数似然之间的差异U和X beta整体斜率校准,测试样品)/ L,和整体素质指数X beta。 Q = D - U是g指数的log相对危险(线性预测)的规模。 L是-2对数似然与β= 0。 “修正”的斜率可以被认为是收缩的因素,需要考虑过拟合。 g的重采样方法的列表。
值----------Value----------
matrix with rows corresponding to Dxy, Slope, D, U, and Q, and columns for the original index, resample estimates, indexes applied to whole or omitted sample using model derived from resample, average optimism, corrected index, and number of successful resamples.<br>
矩阵的行对应Dxy,坡,D,U和Q,和原来的索引列,重采样估计,索引全部或省略样品模型得出的平均乐观,重采样,校正指数,成功的重新采样的数量。<BR>
The values corresponting to the row Dxy are equal to 2 * (C - 0.5) where C is the C-index or concordance probability. If the user is correlating the linear predictor (predicted log hazard) with survival time and she wishes to get the more usual correlation using predicted survival time or predicted survival probability, Dxy should be negated.
行的值correspontingDxy等于2 * (C - 0.5)其中C是在C-指数或语词索引的概率。如果用户与生存时间相关的线性预测(log的危险预测),她希望得到更常见的使用相关的预测生存时间的或预测的生存概率,Dxy应该被否定。
副作用----------Side Effects----------
prints a summary, and optionally statistics for each re-fit (if pr=TRUE)
打印的总结,并选择性地统计每个再适合(如果pr=TRUE)
(作者)----------Author(s)----------
Frank Harrell<br>
Department of Biostatistics, Vanderbilt University<br>
f.harrell@vanderbilt.edu
参见----------See Also----------
validate, predab.resample, fastbw, rms, rms.trans, calibrate, rcorr.cens, cph, survival-internal, gIndex
validate,predab.resample,fastbw,rms,rms.trans,calibrate,rcorr.cens,cph,survival-internal,gIndex
实例----------Examples----------
n <- 1000
set.seed(731)
age <- 50 + 12*rnorm(n)
label(age) <- "Age"
sex <- factor(sample(c('Male','Female'), n, TRUE))
cens <- 15*runif(n)
h <- .02*exp(.04*(age-50)+.8*(sex=='Female'))
dt <- -log(runif(n))/h
e <- ifelse(dt <= cens,1,0)
dt <- pmin(dt, cens)
units(dt) <- "Year"
S <- Surv(dt,e)
f <- cph(S ~ age*sex, x=TRUE, y=TRUE)
# Validate full model fit[验证完整的模型拟合]
validate(f, B=10) # normally B=150[通常B = 150]
# Validate a model with stratification. Dxy is the only[验证分层模型。 DXY是唯一的]
# discrimination measure for such models, by Dxy requires[这些模型的歧视措施,DXY需要]
# one to choose a single time at which to predict S(t|X)[选择一个单一的时间来预测S(T | X)]
f <- cph(S ~ rcs(age)*strat(sex),
x=TRUE, y=TRUE, surv=TRUE, time.inc=2)
validate(f, dxy=TRUE, u=2, B=10) # normally B=150[通常B = 150]
# Note u=time.inc[注意:U = time.inc]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|