bj(rms)
bj()所属R语言包:rms
Buckley-James Multiple Regression Model
巴克利 - 詹姆斯多元回归模型
译者:生物统计家园网 机器人LoveR
描述----------Description----------
bj fits the Buckley-James distribution-free least squares multiple regression model to a possibly right-censored response variable. This model reduces to ordinary least squares if there is no censoring. By default, model fitting is done after taking logs of the response variable. bj uses the rms class for automatic anova, fastbw, validate, Function, nomogram, summary, plot, bootcov, and other functions. The bootcov function may be worth using with bj fits, as the properties of the Buckley-James covariance matrix estimator are not fully known for strange censoring patterns.
bj适合巴克利,詹姆斯分布最小二乘可能右删失的响应变量的多元回归模型。这种模式降低了普通最小二乘如果没有设限。默认情况下,模型的拟合完成后,响应变量的log。 bj使用自动rms,anova,fastbw,validate,Function,nomogram summary类 plot,bootcov“等功能。 bootcov功能可能是值得使用与bj适合,巴克利 - 詹姆斯协方差矩阵估计的属性没有得到充分的奇怪的审查模式。
The residuals.bj function exists mainly to compute residuals and to censor them (i.e., return them as Surv objects) just as the original failure time variable was censored. These residuals are useful for checking to see if the model also satisfies certain distributional assumptions. To get these residuals, the fit must have specified y=TRUE.
residuals.bj函数的存在主要是为了计算残差和审查(例如,他们Surv对象返回),正如的原始故障时间变量被检察。这些残留物是有用的检查,看看如果模型也满足一定的分布假设。要获得这些残差,拟合必须指定了y=TRUE。
The bjplot function is a special plotting function for objects created by bj with x=TRUE, y=TRUE in effect. It produces three scatterplots for every covariate in the model: the first plots the original situation, where censored data are distingushed from non-censored data by a different plotting symbol. In the second plot, called a renovated plot, vertical lines show how censored data were changed by the procedure, and the third is equal to the second, but without vertical lines. Imputed data are again distinguished from the non-censored by a different symbol.
bjplot函数是一个特殊的绘图功能创建的对象的bjx=TRUE, y=TRUE的影响。它产生三个模型中的每一个协变量:第一个图原来的情况,不同的绘图符号,删失数据distingushed非删失数据的散点图。在第二个图,被称为装修的图,垂直线显示删失数据是如何被改变的过程中,第三个是等于第二个,但没有垂直线。估算数据再次区别于非审查由一个不同的符号。
The validate method for bj validates the Somers' Dxy rank correlation between predicted and observed responses, accounting for censoring.
validate方法bj验证萨默斯Dxy排名之间的相关性预测和观察到的响应,占审查。
The primary fitting function for bj is bj.fit, which does not allow missing data and expects a full design matrix as input.
的主要拟合函数bj是的bj.fit,不允许丢失数据,需要一个完整的设计矩阵作为输入。
用法----------Usage----------
bj(formula=formula(data), data, subset, na.action=na.delete,
link="log", control, method='fit', x=FALSE, y=FALSE,
time.inc)
## S3 method for class 'bj'
print(x, digits=4, long=FALSE, coefs=TRUE, latex=FALSE,
title="Buckley-James Censored Data Regression", ...)
## S3 method for class 'bj'
residuals(object, type=c("censored","censored.normalized"),...)
bjplot(fit, which=1:dim(X)[[2]])
## S3 method for class 'bj'
validate(fit, method="boot", B=40,
bw=FALSE,rule="aic",type="residual",sls=.05,aics=0,
force=NULL, pr=FALSE,
dxy=TRUE, tol=1e-7, rel.tolerance=1e-3, maxiter=15, ...)
bj.fit(x, y, control)
参数----------Arguments----------
参数:formula
an S statistical model formula. Interactions up to third order are supported. The left hand side must be a Surv object.
的统计模型公式。支持相互作用三阶。左手侧必须Surv对象。
参数:data,subset,na.action
the usual statistical model fitting arguments
通常的统计模型拟合参数
参数:fit
a fit created by bj, required for all functions except bj.
一个合适的bj,所需的所有功能,但bj。
参数:x
a design matrix with or without a first column of ones, to pass to bj.fit. All models will have an intercept. For print.bj is a result of bj. For bj, set x=TRUE to include the design matrix in the fit object.
一个设计矩阵的第一列的带或不带,要传递到bj.fit。所有车型都将拥有一个拦截。 print.bj是因bj。对于bj,设置x=TRUE,包括设计矩阵在合适的对象。
参数:y
a Surv object to pass to bj.fit as the two-column response variable. Only right censoring is allowed, and there need not be any censoring. For bj, set y to TRUE to include the two-column response matrix, with the event/censoring indicator in the second column. The first column will be transformed according to link, and depending on na.action, rows with missing data in the predictors or the response will be deleted.
Surv对象传递给bj.fit两列的响应变量。唯一正确的审查是允许的,不需要任何审查。对于bj,设置y到TRUE,包括两列响应矩阵,在第二列中的事件/审查指标。根据link,并根据na.action,行的预测或响应丢失的数据将被删除,第一列将被改造。
参数:link
set to, for example, "log" (the default) to model the log of the response, or "identity" to model the untransformed response.
设置,例如,"log"(默认值)来模拟响应的log,或"identity"未转换的响应模型。
参数:control
a list containing any or all of the following components: iter.max (maximum number of iterations allowed, default is 20), eps (convergence criterion: concergence is assumed when the ratio of sum of squared errors from one iteration to the next is between 1-eps and 1+eps), trace (set to TRUE to monitor iterations), tol (matrix singularity criterion, default is 1e-7), and 'max.cycle' (in case of nonconvergence the program looks for a cycle that repeats itself, default is 30).
一个列表,其中包含的任何或全部以下组件:iter.max(迭代允许的最大数量,默认为20),eps(收敛的标准:concergence是假定时的误差平方和的比例从一迭代到下一个介于1 - eps和1 +eps)trace(TRUE监控迭代),tol(矩阵奇异标准,默认是1e-7),和“max.cycle”(在不收敛的情况下,程序会寻找一个循环,重复本身,默认为30)。
参数:method
set to "model.frame" or "model.matrix" to return one of those objects rather than the model fit.
设置为"model.frame"或"model.matrix"返回一个这样的对象,而不是模型拟合。
参数:dxy
set to FALSE to prevent Somers' D_{xy} from being computed by validate (saves time for very large datasets)
设置为FALSE防止萨默斯D_{xy}validate(节省时间,对于非常大的数据集)计算
参数:time.inc
setting for default time spacing. Default is 30 if time variable has units="Day", 1 otherwise, unless maximum follow-up time < 1. Then max time/10 is used as time.inc. If time.inc is not given and max time/default time.inc is > 25, time.inc is increased.
设置为默认的时间间隔。默认值是30如果时间变量units="Day",否则为1,除非最长随访时间< 1,。然后最大time/10是作为time.inc。 time.inc如果不和最大时间/默认time.inc是> 25,time.inc增加。
参数:digits
number of significant digits to print if not 4.
数量巨大的数字打印,如果不是4。
参数:long
set to TRUE to print the correlation matrix for parameter estimates
设置为TRUE打印参数估计值的相关性矩阵
参数:coefs
specify coefs=FALSE to suppress printing the table of model coefficients, standard errors, etc. Specify coefs=n to print only the first n regression coefficients in the model.
指定coefs=FALSE抑制打印表格模型系数,标准误差等指定coefs=n要打印只有第一个n回归系数的模型。
参数:latex
a logical value indicating whether information should be formatted as plain text or as LaTeX markup
一逻辑值,表示信息是否应该被格式化为纯文本或乳胶标记
参数:title
a character string title to be passed to prModFit
一个字符串标题要传递给prModFit
参数:object
the result of bj
结果bj
参数:type
type of residual desired. Default is censored unnormalized residuals, defined as link(Y) - linear.predictors, where the link function was usually the log function. You can specify type="censored.normalized" to divide the residuals by the estimate of sigma.
类型的残余所需的。默认审查非标准化的残差,定义为链接(Y) - linear.predictors,其中的纽带作用通常是log功能。您可以指定type="censored.normalized"的估计sigma的划分的残差。
参数:which
vector of integers or character strings naming elements of the design matrix (the names of the original predictors if they entered the model linearly) for which to have bjplot make plots of only the variables listed in which (names or numbers).
向量设计矩阵的元素(原来的预测因子的名称,如果他们进入模型线性)的已bjplot使图仅列出的变量在which(名称命名的整数或字符串或数字)。
参数:B,bw,rule,sls,aics,force,pr,tol,rel.tolerance,maxiter
see predab.resample
看到predab.resample
参数:...
ignored for print; passed through to predab.resample for validate
忽略print;通过predab.resamplevalidate
Details
详细信息----------Details----------
The program implements the algorithm as described in the original article by Buckley & James. Also, we have used the original Buckley & James prescription for computing variance/covariance estimator. This is based on non-censored observations only and does not have any theoretical justification, but has been shown in simulation studies to behave well. Our experience confirms this view. Convergence is rather slow with this method, so you may want to increase the number of iterations. Our experience shows that often, in particular with high censoring, 100 iterations is not too many. Sometimes the method will not converge, but will instead enter a loop of repeating values (this is due to the discrete nature of Kaplan and Meier estimator and usually happens with small sample sizes). The program will look for such a loop and return the average betas. It will also issue a warning message and give the size of the cycle (usually less than 6).
该程序实现了巴克利和詹姆斯在原来的文章中所描述的算法。此外,我们还用原来的巴克利和詹姆斯处方计算方差/协方差估计。这是基于非审查的意见,并没有任何理论依据,但已被证明在模拟研究,举止得体。根据我们的经验证实了这一观点。用这种方法的收敛是相当缓慢的,所以你可能要增加迭代次数。我们的经验表明,通常情况下,特别是高审查,100次迭代是没有太多。的方法有时会不收敛,而是将进入一个循环重复的值(这是由于Kaplan和Meier估算的离散性,通常发生在小样本量)。该计划将寻找这样一个循环,并返回的平均贝塔值。它也将发出警告信息,并大小的周期(通常小于6)。
值----------Value----------
bj returns a fit object with similar information to what survreg, psm, cph would store as well as what rms stores and units and time.inc. residuals.bj returns a Surv object. One of the components of the fit object produced by bj (and bj.fit) is a vector called stats which contains the following names elements: "Obs", "Events", "d.f.","error d.f.","sigma","g". Here sigma is the estimate of the residual standard deviation. g is the g-index. If the link function is "log", the g-index on the anti-log scale is also returned as gr.
bj返回一个合适的对象,什么survreg,psm,cph将存储以及类似的信息rms商店和units和time.inc。 residuals.bj返回一个Surv对象。的组件的fit对象bj(和bj.fit)是一个向量,称为stats其中包含下列名称的元素:"Obs", "Events", "d.f.","error d.f.","sigma","g"。这是sigma是剩余标准差的估计。 g的的g指数。如果链接的功能是"log",g指数的反log规模也为gr返回。
(作者)----------Author(s)----------
Janez Stare<br>
Department of Biomedical Informatics<br>
Ljubljana University<br>
Ljubljana, Slovenia<br>
<a href="mailto:janez.stare@mf.uni-lj.si">janez.stare@mf.uni-lj.si</a>
Harald Heinzl<br>
Department of Medical Computer Sciences<br>
Vienna University<br>
Vienna, Austria<br>
<a href="mailto:harald.heinzl@akh-wien.ac.at">harald.heinzl@akh-wien.ac.at</a>
Frank Harrell<br>
Department of Biostatistics<br>
Vanderbilt University<br>
<a href="mailto:f.harrell@vanderbilt.edu">f.harrell@vanderbilt.edu</a>
参考文献----------References----------
66:429–36.
521–31.
data. Ann Statist 1984; 12: 590–600.
regression analysis with censored data. Ann Statist 1991; 19: 1370–402.
参见----------See Also----------
rms, psm, survreg, cph, Surv, na.delete, na.detail.response, datadist, rcorr.cens, GiniMd, prModFit
rms,psm,survreg,cph,Surv,na.delete,na.detail.response,datadist,rcorr.cens,GiniMd,prModFit
实例----------Examples----------
set.seed(1)
ftime <- 10*rexp(200)
stroke <- ifelse(ftime > 10, 0, 1)
ftime <- pmin(ftime, 10)
units(ftime) <- "Month"
age <- rnorm(200, 70, 10)
hospital <- factor(sample(c('a','b'),200,TRUE))
dd <- datadist(age, hospital)
options(datadist="dd")
f <- bj(Surv(ftime, stroke) ~ rcs(age,5) + hospital, x=TRUE, y=TRUE)
# add link="identity" to use a censored normal regression model instead[添加链接=“身份”审查的正常回归模型,而不是使用]
# of a lognormal one[对数正态分布]
anova(f)
fastbw(f)
validate(f, B=15)
plot(Predict(f, age, hospital))
# needs datadist since no explicit age,hosp.[由于没有明确的年龄,HOSP需要datadist。]
coef(f) # look at regression coefficients[看看回归系数]
coef(psm(Surv(ftime, stroke) ~ rcs(age,5) + hospital, dist='lognormal'))
# compare with coefficients from likelihood-based[基于可能性的系数比较]
# log-normal regression model[对数正态回归模型]
# use dist='gau' not under R [使用dist =GAU在R]
r <- resid(f, 'censored.normalized')
survplot(survfit(r ~ 1), conf='none')
# plot Kaplan-Meier estimate of [图Kaplan-Meier估计的]
# survival function of standardized residuals[生存函数的标准化残差]
survplot(survfit(r ~ cut2(age, g=2)), conf='none')
# may desire both strata to be n(0,1)[可能希望既阶层,N(0,1)]
options(datadist=NULL)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|