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

R语言 rms包 validate()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-27 19:18:10 | 显示全部楼层 |阅读模式
validate(rms)
validate()所属R语言包:rms

                                         Resampling Validation of a Fitted Model's Indexes of Fit
                                         重新取样验证一个合适的模型的拟合指标

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

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

The validate function when used on an object created by one of the rms series does resampling validation of a  regression model, with or without backward step-down variable deletion.
validate函数时,使用创建的对象之一rms系列的回归模型进行验证并重新取样,带或不带落后降压变量的缺失。


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


# fit <- fitting.function(formula=response ~ terms, x=TRUE, y=TRUE)
validate(fit, method="boot", B=40,
         bw=FALSE, rule="aic", type="residual", sls=0.05, aics=0,
         force=NULL, pr=FALSE, ...)
## S3 method for class 'validate'
print(x, digits=4, B=Inf, ...)
## S3 method for class 'validate'
latex(object, digits=4, B=Inf, file='', append=FALSE,
                         title=first.word(deparse(substitute(x))),
                         caption=NULL, table.env=FALSE,
                         size='normalsize', extracolsize=size, ...)



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

参数:fit
a fit derived by e.g. lrm, cph, psm, ols. The options x=TRUE and y=TRUE must have been specified.  
通过例如产生一个合适的lrm,cph,psm,ols。的选项x=TRUE和y=TRUE必须被指定。


参数:method
may be "crossvalidation", "boot" (the default), ".632", or "randomization". See predab.resample for details.  Can abbreviate, e.g. "cross", "b", ".6".  
可能是"crossvalidation","boot"(默认值),".632"或"randomization"。见predab.resample的详细信息。可以缩写,例如"cross", "b", ".6"。


参数:B
number of repetitions.  For method="crossvalidation", is the number of groups of omitted observations.  For print.validate and latex.validate, B is an upper limit on the number of resamples for which information is printed about which variables were selected in each model re-fit.  Specify zero to suppress printing.  Default is to print all re-samples.  
重复的次数。对于method="crossvalidation",是省略观察组的数量。对于print.validate和latex.validate,B是一个信息的变量选择的每个模型中再适合打印的重新采样的数量上限。指定零压制打印。默认情况下是打印所有样本。


参数: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.  
适用,如果bw=TRUE。 "aic"使用赤池信息准则,停止规则(即,删除一个因素是,如果chi-square低于其自由度的两倍),或"p"使用P值。


参数: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每个重复打印结果


参数:...
parameters for each specific validate function, and parameters to pass to predab.resample (note especially the group, cluster, amd subset parameters).  For latex, optional arguments to latex.default.  For psm, you can pass the maxiter parameter here (passed to  survreg.control, default is 15 iterations) as well as a tol parameter  for judging matrix singularity in solvet (default is 1e-12) and a rel.tolerance parameter that is passed to survreg.control (default is 1e-5).  For print.validate ... is ignored.  
对于每一个具体的验证功能和参数的参数传递给predab.resample(特别注意group,clusterAMDsubset参数)。对于latex,可选的参数latex.default。对于psm,你可以通过maxiter参数(传递给survreg.control,默认为15次迭代),以及一个tol参数为判断矩阵的奇异性<X >(默认是1e-12)和solvet参数被传递到rel.tolerance(默认是1e-5)。对于survreg.control...将被忽略。


参数:x,object
an object produced by one of the validate functions
validate函数之一产生一个目的


参数:digits
number of decimal places to print
数的小数位数打印


参数:file
file to write LaTeX output.  Default is standard output.
文件写LaTeX输出。默认值是标准输出。


参数:append
set to TRUE to append LaTeX output to an existing file
TRUELaTeX的输出附加到现有文件设置为


参数:title, caption, table.env, extracolsize
see latex.default.  If table.env is FALSE and caption is given, the character string contained in caption will be placed before the table, centered.
看到latex.default。如果table.env是FALSE和caption,caption将被放置在表前,中心的字符串包含。


参数:size
size of LaTeX output.  Default is 'normalsize'.  Must be a defined LaTeX size when prepended by double slash.  
LaTeX输出的大小。默认是'normalsize'。双斜线前缀时,必须是一个已定义的LaTeX的大小。


Details

详细信息----------Details----------

It provides bias-corrected indexes that are specific to each type of model. For validate.cph and validate.psm, see validate.lrm, which is similar. <br> For validate.cph and validate.psm, there is an extra argument dxy, which if TRUE causes the rcorr.cens function to be invoked to compute the Somers' Dxy rank correlation to be computed at each resample (this takes a bit longer than the likelihood based statistics). The values corresponting to the row Dxy are equal to 2 * (C - 0.5) where C is the C-index or concordance probability. <br>
它提供偏置校正的指标,是特定于每一种类型的模型。对于validate.cph和validate.psm,validate.lrm,这是类似的。 <br>对于validate.cph和validate.psm,有一个额外的参数dxy,如果TRUE导致rcorr.cens函数被调用计算萨默斯, Dxy等级相关,在每个重采样计算(这需要更长的时间比基于统计的可能性)。行的值correspontingDxy等于2 * (C - 0.5)其中C是在C-指数或语词索引的概率。参考

For validate.cph with dxy=TRUE, you must specify an argument u if the model is stratified, since survival curves can then cross and X beta is not 1-1 with predicted survival. <br> There is also validate method for tree, which only does cross-validation and which has a different list of arguments.   
对于validate.cphdxy=TRUE,你必须指定一个参数u如果模型是分层的,因为生存曲线,然后穿过和X beta是1-1与预测生存。参考validatetree,这不仅交叉验证,并且具有不同的参数列表的方法。


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

a matrix with rows corresponding to the statistical indexes and columns for columns for the original index, resample estimates,  indexes applied to the whole or omitted sample using the model derived from the resample, average optimism, corrected index, and number of successful re-samples.
修正矩阵的行对应于原来的索引列,重采样适用于全部或省略的样品,利用该模型来自重采样,平均乐观的估计,索引,索引和列的统计指标,和一些成功的样本。


副作用----------Side Effects----------

prints a summary, and optionally statistics for each re-fit
为每一个再适合打印的总结,并选择性地统计


(作者)----------Author(s)----------



Frank Harrell<br>
Department of Biostatistics, Vanderbilt University<br>
f.harrell@vanderbilt.edu




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

validate.ols, validate.cph, validate.lrm, validate.rpart,  predab.resample, fastbw, rms, rms.trans, calibrate
validate.ols,validate.cph,validate.lrm,validate.rpart,predab.resample,fastbw,rms,rms.trans,calibrate


实例----------Examples----------


# See examples for validate.cph, validate.lrm, validate.ols[见的例子为validate.cph,validate.lrm,validate.ols]
# Example of validating a parametric survival model:[验证参数生存模型的例子:]

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 &lt;- psm(S ~ age*sex, x=TRUE, y=TRUE)  # Weibull model[Weibull模型]
# Validate full model fit[验证完整的模型拟合]
validate(f, B=10)                # usually B=150[通常B = 150]


# Validate stepwise model with typical (not so good) stopping rule[验证逐步模型与典型的(不太好)停止规则]
# bw=TRUE does not preserve hierarchy of terms at present[目前体重= TRUE不保留术语层次]
validate(f, B=10, bw=TRUE, rule="p", sls=.1, type="individual")

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-24 11:02 , Processed in 0.023954 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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