validate.ols(rms)
validate.ols()所属R语言包:rms
Validation of an Ordinary Linear Model
一般的线性模型的验证
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The validate function when used on an object created by ols does resampling validation of a multiple linear regression model, with or without backward step-down variable deletion. Uses resampling to estimate the optimism in various measures of predictive accuracy which include R^2, MSE (mean squared error with a denominator of n), the g-index, and the intercept and slope of an overall calibration a + b * (predicted y). The "corrected" slope can be thought of as shrinkage factor that takes into account overfitting. validate.ols can also be used when a model for a continuous response is going to be applied to a binary response. A Somers' D_{xy} for this case is computed for each resample by dichotomizing y. This can be used to obtain an ordinary receiver operating characteristic curve area using the formula 0.5(D_{xy} + 1). The Nagelkerke-Maddala R^2 index for the dichotomized y is also given. See predab.resample for the list of resampling methods.
validate功能使用时,ols不重采样的多元线性回归模型进行验证,或不落后一步的变数删除创建的对象。使用重采样估计的乐观预测的准确性,其中包括R^2,MSE(n)g指数的分母均方误差与,并在各种措施的截距和斜率的整体校准a + b * (predicted y)。 “修正”的斜率可以被认为是收缩的因素,需要考虑过拟合。 validate.ols时,也可用于连续反应的模型为将要被施加到一个二进制响应。一个萨默斯D_{xy}这种情况下,计算每个重采样的二分法y。这可以被用来获得一个普通的接收机工作特性曲线下面积,使用式0.5(D_{xy} + 1)。 Nagelkerke-MaddalaR^2指数的二分y也。 predab.resample的重采样方法的列表。
The LaTeX needspace package must be in effect to use the latex method.
必须在效果LaTeX的needspace包,使用latex方法。
用法----------Usage----------
# fit <- fitting.function(formula=response ~ terms, x=TRUE, y=TRUE)
## S3 method for class 'ols'
validate(fit, method="boot", B=40,
bw=FALSE, rule="aic", type="residual", sls=0.05, aics=0,
force=NULL, pr=FALSE, u=NULL, rel=">", tolerance=1e-7, ...)
参数----------Arguments----------
参数:fit
a fit derived by ols. The options x=TRUE and y=TRUE must have been specified. See validate for a description of arguments method - pr.
适合取得的ols。的选项x=TRUE和y=TRUE必须被指定。见validate参数的描述method - pr。
参数:method,B,bw,rule,type,sls,aics,force,pr
see validate and predab.resample and fastbw
看到validate和predab.resample和fastbw
参数:u
If specifed, y is also dichotomized at the cutoff u for the purpose of getting a bias-corrected estimate of D_{xy}.
如果具体确定,y还二在截止u为目的,得到一个修正偏置估计D_{xy}。
参数:rel
relationship for dichotomizing predicted y. Defaults to ">" to use y>u. rel can also be "<", ">=", and "<=".
关系,二分法预测y。默认为">"使用y>u。 rel也可以"<",">="和"<="。
参数:tolerance
tolerance for singularity; passed to lm.fit.qr.
容忍奇点;传递给lm.fit.qr。
参数:...
other arguments to pass to predab.resample, such as group, cluster, and subset </table>
其他参数传递给predab.resample,如group,cluster和subset </表>
值----------Value----------
matrix with rows corresponding to R-square, MSE, g, intercept, slope, and optionally D_{xy} and R^2, 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.
矩阵的行对应的R-平方,MSE,G,截距,斜率,并选择性地D_{xy}和R^2,和原来的索引列,重采样估计,索引适用于全部或省略的样品模型来自重采样,平均乐观,纠正指数,成功的重采样的数量。
副作用----------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----------
ols, predab.resample, fastbw, rms, rms.trans, calibrate, gIndex
ols,predab.resample,fastbw,rms,rms.trans,calibrate,gIndex
实例----------Examples----------
set.seed(1)
x1 <- runif(200)
x2 <- sample(0:3, 200, TRUE)
x3 <- rnorm(200)
distance <- (x1 + x2/3 + rnorm(200))^2
f <- ols(sqrt(distance) ~ rcs(x1,4) + scored(x2) + x3, x=TRUE, y=TRUE)
#Validate full model fit (from all observations) but for x1 < .75[验证完整的模型拟合(从所有观测),但对于x1 <0.75]
validate(f, B=20, subset=x1 < .75) # normally B=150[通常B = 150]
#Validate stepwise model with typical (not so good) stopping rule[验证逐步模型与典型的(不太好)停止规则]
validate(f, B=20, bw=TRUE, rule="p", sls=.1, type="individual")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|