smoothSurvReg(smoothSurv)
smoothSurvReg()所属R语言包:smoothSurv
Regression for a Survival Model with Smoothed Error Distribution
为平滑误差分布的生存模型与回归
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Regression for a survival model. These are all time-transformed location models, with the most useful case being the accelerated failure models that use a log transformation. Error distribution is assumed to be a mixture of G-splines. Parameters are estimated by the penalized maximum likelihood method.
回归的生存模式。这些都是转化的选址模型,最有用的情况下,加速失效模型,使用对数转换。误差分布被假定为G-样条曲线的混合物。估计参数的惩罚最大似然方法。
用法----------Usage----------
smoothSurvReg(formula = formula(data), logscale = ~1,
data = parent.frame(), subset, na.action = na.fail,
init.beta, init.logscale, init.c, init.dist = "best",
update.init = TRUE, aic = TRUE, lambda = exp(2 -9)),
model = FALSE, control = smoothSurvReg.control(), ...)
参数----------Arguments----------
参数:formula
A formula expression as for other regression models. See the documentation for lm and formula for details. Use Surv on the left hand side of the formula.
其他回归模型的公式表达。 lm和formula的详细信息,请参阅文档。是使用Surv上的左手侧的通式。
参数:logscale
A formula expression to determine a possible dependence of the log-scale on covariates.
公式确定可能的对数尺度的依赖协变量的表达式。
参数:data
Optional data frame in which to interpret the variables occurring in the formula.
可选的数据框,其中解释的变量发生在式。
参数:subset
Subset of the observations to be used in the fit.
的子集,在拟合中使用的观测。
参数:na.action
Function to be used to handle any NAs in the data. It's default value is na.fail. It is not recommended to change it in the case when logscale depends on covariates.
函数是用来处理任何NAS中的数据。它的默认值是na.fail。它不改变的情况下,当logscale取决于协变量。
参数:init.beta
Optional vector of the initial values of the regression parameter beta (intercept and regression itself).
可选向量回归参数beta(截距和回归本身)的初始值。
参数:init.logscale
Optional value of the initial value of the parameters that determines the log-scale parameter log(sigma).
可选值的参数的初始值,决定log尺度参数log(sigma)。
参数:init.c
Optional vector of the initial values for the G-spline coefficients c, all values must lie between 0 and 1 and must sum up to 1.
可选的G-样条系数c的初始值的矢量,所有的值必须位于0和1之间,必须总结1。
参数:init.dist
A character string specifying the distribution used by survreg to find the initial values for parameters (if not given by the user). It is assumed to name "best" or an element from survreg.distributions. These include "weibull", "exponential", "gaussian", "logistic", "lognormal" and "loglogistic". If "best" is specified one of "lognormal", "weibull" and "loglogistic" giving the highest likelihood is used.
一个字符串,指定分配使用survreg找到参数的初始值(如果没有给定的用户)。它被假定为名称"best"从survreg.distributions或元素。这些措施包括"weibull","exponential","gaussian","logistic","lognormal"和"loglogistic"。如果“最好”是特定的一个"lognormal","weibull"和"loglogistic"给最有可能被使用。
参数:update.init
If TRUE, the initial values are updated during the grid search for the lambda parameter giving the optimal AIC. Otherwise, fits with all lambdas during the grid search start with same initials determine at the beginning either from the values of init.beta, init.scale, init.c or from the initial survreg fit as determined by the parameter init.dist.
如果是TRUE,初始值在网格的的lambda参数,最佳的AIC搜索更新。否则,适合与所有在网格lambda表达式检索开始与相同的首字母缩写,在开始时,无论是从确定init.beta, init.scale, init.c或从最初的survreg的值拟合所确定的参数init.dist。
参数:aic
If TRUE the optimal value of the tuning parameter lambda is determined via a grid search through the values specified by the parameter lambda. If FALSE, only the model with lambda = lambda[1] is fitted.
如果是TRUE的优化参数的最佳值lambda决定通过指定的值的参数lambda通过网格搜索。如果为FALSE,只有模型与lambda = lambda[1]安装。
参数:lambda
A grid of values of the tuning parameter lambda searched for the optimal value if aic = TRUE.
一格的的调整参数lambda值的最优值,如果aic= TRUE搜索。
参数:model
If TRUE, the model frame is returned.
如果返回TRUE,该模型框架。
参数:control
A list of control values, in the format producted by smoothSurvReg.control.
控制值的列表,格式为开发生产的smoothSurvReg.control。
参数:...
Other arguments which will be passed to smoothSurvReg.control. See its help page for more options to control the fit and for the possibility to fix some values and not to estimate them.
其他参数将被传递给smoothSurvReg.control。请参阅帮助页面,为更多的选项来控制的配合和修正了一些值,而不是估计的可能性。
Details
详细信息----------Details----------
Read the papers referred below.
阅读下文所述的文件。
There is a slight difference in the definition of the penalty used by the R function compared to what is written in the paper. The penalized log-likelihood given in the paper has a form
有一个轻微的差异的惩罚的定义中所使用的R函数相比,是写在纸。文中给出的处罚对数似然的一种形式
while the penalized log-likelihood used in the R function multiplies the tuning parameter lambda given by lambda by a sample size n to keep default values more or less useful for samples of different sizes. So that the penalized log-likelihood which is maximized by the R function has the form
而受到处罚的记录R函数中使用的可能性乘以调整参数lambda给定的lambda样本大小n保持默认值或多或少有用的,不同尺寸的样品。这样的处罚对数似然最大化R函数的形式
值----------Value----------
An object of class smoothSurvReg is returned. See smoothSurvReg.object for details.
一个对象的类smoothSurvReg的返回。见smoothSurvReg.object的详细信息。
(作者)----------Author(s)----------
Arno拧t Kom谩rek <a href="mailto:arnost.komarek[AT]mff.cuni.cz">arnost.komarek[AT]mff.cuni.cz</a>
参考文献----------References----------
Accelerated failure time model for arbitrarily censored data with smoothed error distribution. Journal of Computational and Graphical Statistics, 14, 726–745.
An overview of methods for interval-censored data with an emphasis on applications in dentistry. Statistical Methods in Medical Research, 14, 539–552.
实例----------Examples----------
##### EXAMPLE 1: Common scale[####示例1:普通规模]
##### ========================[####========================]
### We generate interval censored data and fit a model with few artificial covariates[##我们产生一些人为的协变量区间数据拟合模型]
set.seed(221913282)
x1 <- rbinom(50, 1, 0.4) ## binary covariate[#二进制协]
x2 <- rnorm(50, 180, 10) ## continuous covariate[连续协]
y1 <- 0.5*x1 - 0.01*x2 + 0.005 *x1*x2 + 1.5*rnorm(50, 0, 1) ## generate log(T), left limit[#生成log(T),左极限]
t1 <- exp(y1) ## left limit of the survival time[#左极限的存活时间]
t2 <- t1 + rgamma(50, 1, 1) ## right limit of the survival time[#右极限的生存时间]
surv <- Surv(t1, t2, type = "interval2") ## survival object[#生存的对象]
## Fit the model with an interaction[#拟合模型的相互作用]
fit1 <- smoothSurvReg(surv ~ x1 * x2, logscale = ~1, info = FALSE, lambda = exp(2 -1)))
## Print the summary information[#打印的摘要信息]
summary(fit1, spline = TRUE)
## Plot the fitted error distribution[#图的拟合误差分布]
plot(fit1)
## Plot the fitted error distribution with its components[#图的拟合误差分布与组件]
plot(fit1, components = TRUE)
## Plot the cumulative distribution function corresponding to the error density[#图的累积分布函数对应的错误密度]
survfit(fit1, cdf = TRUE)
## Plot survivor curves for persons with (x1, x2) = (0, 180) and (1, 180)[#绘制存活曲线与(X1,X2)=(0,180)和(1,180)的人]
cov <- matrix(c(0, 180, 0, 1, 180, 180), ncol = 3, byrow = TRUE)
survfit(fit1, cov = cov)
## Plot hazard curves for persons with (x1, x2) = (0, 180) and (1, 180)[#图危险曲线(X1,X2)=(0,180)和(1,180)的人]
cov <- matrix(c(0, 180, 0, 1, 180, 180), ncol = 3, byrow = TRUE)
hazard(fit1, cov = cov)
## Plot densities for persons with (x1, x2) = (0, 180) and (1, 180)[#图密度(X1,X2)=(0,180)和(1,180)的人]
cov <- matrix(c(0, 180, 0, 1, 180, 180), ncol = 3, byrow = TRUE)
fdensity(fit1, cov = cov)
## Compute estimates expectations of survival times for persons with[#计算估计的预期生存时间的人]
## (x1, x2) = (0, 180), (1, 180), (0, 190), (1, 190), (0, 200), (1, 200)[#(X1,X2)=(0,180),(1,180),(0,190),(1,190),(0,200),(1,200)]
## and estimates of a difference of these expectations:[这些期望和估计的差异:]
## T(0, 180) - T(1, 180), T(0, 190) - T(1, 190), T(0, 200) - T(1, 200),[#T - T(1,180),T(0,190) - T(1,190),T(0,200) - T(1,200),(0,180)]
cov1 <- matrix(c(0, 180, 0, 0, 190, 0, 0, 200, 0), ncol = 3, byrow = TRUE)
cov2 <- matrix(c(1, 180, 180, 1, 190, 190, 1, 200, 200), ncol = 3, byrow = TRUE)
print(estimTdiff(fit1, cov1 = cov1, cov2 = cov2))
##### EXAMPLE 2: Scale depends on covariates[####例2:规模取决于协变量]
##### =======================================[####=======================================]
### We generate interval censored data and fit a model with few artificial covariates[##我们产生一些人为的协变量区间数据拟合模型]
set.seed(221913282)
x1 <- rbinom(50, 1, 0.4) ## binary covariate[#二进制协]
x2 <- rnorm(50, 180, 10) ## continuous covariate[连续协]
x3 <- runif(50, 0, 1) ## covariate for the scale parameter[#为尺度参数的协]
logscale <- 1 + x3
scale <- exp(logscale)
y1 <- 0.5*x1 - 0.01*x2 + 0.005 *x1*x2 + scale*rnorm(50, 0, 1) ## generate log(T), left limit[#生成log(T),左极限]
t1 <- exp(y1) ## left limit of the survival time[#左极限的存活时间]
t2 <- t1 + rgamma(50, 1, 1) ## right limit of the survival time[#右极限的生存时间]
surv <- Surv(t1, t2, type = "interval2") ## survival object[#生存的对象]
## Fit the model with an interaction[#拟合模型的相互作用]
fit2 <- smoothSurvReg(surv ~ x1 * x2, logscale = ~x3, info = FALSE, lambda = exp(2 -1)))
## Print the summary information[#打印的摘要信息]
summary(fit2, spline = TRUE)
## Plot the fitted error distribution[#图的拟合误差分布]
plot(fit2)
## Plot the fitted error distribution with its components[#图的拟合误差分布与组件]
plot(fit2, components = TRUE)
## Plot survivor curves for persons with (x1, x2) = (0, 180) and (1, 180)[#绘制存活曲线与(X1,X2)=(0,180)和(1,180)的人]
## x3 = 0.8 and 0.9[#×3 = 0.8和0.9]
cov <- matrix(c(0, 180, 0, 1, 180, 180), ncol = 3, byrow = TRUE)
logscale.cov <- c(0.8, 0.9)
survfit(fit2, cov = cov, logscale.cov = logscale.cov)
## Plot hazard curves for persons with (x1, x2) = (0, 180) and (1, 180)[#图危险曲线(X1,X2)=(0,180)和(1,180)的人]
## x3 = 0.8 and 0.9[#×3 = 0.8和0.9]
cov <- matrix(c(0, 180, 0, 1, 180, 180), ncol = 3, byrow = TRUE)
logscale.cov <- c(0.8, 0.9)
hazard(fit2, cov = cov, logscale.cov=c(0.8, 0.9))
## Plot densities for persons with (x1, x2) = (0, 180) and (1, 180)[#图密度(X1,X2)=(0,180)和(1,180)的人]
## x3 = 0.8 and 0.9[#×3 = 0.8和0.9]
cov <- matrix(c(0, 180, 0, 1, 180, 180), ncol = 3, byrow = TRUE)
logscale.cov <- c(0.8, 0.9)
fdensity(fit2, cov = cov, logscale.cov = logscale.cov)
## More involved examples can be found in script files[#更多参与的例子可以在脚本文件中]
## used to perform analyses and draw pictures [#用来进行分析和绘制图片]
## presented in above mentioned references.[#在上面提到的参考文献。]
## These scripts and some additional files can be found as *.tar.gz files[#这些脚本和一些额外的文件可以发现*。tar.gz文件]
## in the /inst/doc directory of this package.[#在这个包/安装/ doc目录中。]
##[#]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|