维护者 | Arthur Allignol,Aurelien Latouche |
联系 | arthur.allignol at gmail.com |
版本 | 2023-09-10 |
URL | https://CRAN.R-project.org/view=Survival |
来源 | https://github.com/cran-task-views/Survival/ |
贡献 | 欢迎对本任务视图提出建议和改进,可以通过 GitHub 上的问题或拉取请求,或通过电子邮件发送给维护者地址。有关更多详细信息,请参阅 贡献指南。 |
引用 | Arthur Allignol,Aurelien Latouche (2023)。CRAN 任务视图:生存分析。版本 2023-09-10。URL https://CRAN.R-project.org/view=Survival。 |
安装 | 可以使用 ctv 包自动安装本任务视图中的包。例如,ctv::install.views("Survival", coreOnly = TRUE) 安装所有核心包,或 ctv::update.views("Survival") 安装所有尚未安装和更新的包。有关更多详细信息,请参阅 CRAN 任务视图计划。 |
生存分析,在社会科学中也称为事件史分析,或在工程学中称为可靠性分析,处理事件发生的时间。但是,此失效时间可能在相关时间段内未被观察到,从而产生所谓的删失观察。
本任务视图旨在介绍用于分析事件时间数据的有用 R 包。
如果发现任何不准确或缺失的内容,请通过电子邮件或通过在上面链接的 GitHub 存储库中提交问题或拉取请求,告知维护者。
survfit
function from the survival package computes the Kaplan-Meier estimator for truncated and/or censored data. rms (replacement of the Design package) proposes a modified version of the survfit
function. The prodlim package implements a fast algorithm and some features not included in survival. Various confidence intervals and confidence bands for the Kaplan-Meier estimator are implemented in the km.ci package. plot.Surv
of package eha plots the Kaplan-Meier estimator. The NADA package includes a function to compute the Kaplan-Meier estimator for left-censored data. svykm
in survey provides a weighted Kaplan-Meier estimator. The kaplan-meier
function in spatstat computes the Kaplan-Meier estimator from histogram data. The KM
function in package rhosp plots the survival function using a variant of the Kaplan-Meier estimator in a hospitalisation risk context. The survPresmooth package computes presmoothed estimates of the main quantities used for right-censored data, i.e., survival, hazard and density functions. The asbio package permits to compute the Kaplan-Meier estimator following Pollock et al. (1998). The bpcp package provides several functions for computing confidence intervals of the survival distribution (e.g., beta product confidence procedure). The kmc package implements the Kaplan-Meier estimator with constraints. The landest package allows landmark estimation and testing of survival probabilities. The jackknifeKME (archived) package computes the original and modified jackknife estimates of Kaplan-Meier estimators. The tranSurv package permits to estimate a survival distribution in the presence of dependent left-truncation and right-censoring. The condSURV package provides methods for estimating the conditional survival function for ordered multivariate failure time data. The gte package implements the generalised Turnbull estimator proposed by Dehghan and Duchesne for estimating the conditional survival function with interval-censored data.非参数最大似然估计 (NPMLE):
Icens 包提供了多种方法来计算各种删失和截断方案的生存分布的 NPMLE。 MLEcens 也可用于计算区间删失数据的 MLE。 dblcens 允许计算左删失和右删失数据的累积分布函数的 NPMLE。 interval 包中的 icfit
函数计算区间删失数据的 NPMLE。 DTDA 包实现了多种算法,允许分析可能双重截断的生存数据。
npsurv 计算一般区间删失数据的生存函数的 NPMLE。 csci 包为当前状态数据的事件时间的累积分布函数提供置信区间,包括一种新的有效(即精确)方法。
参数: fitdistrplus 包允许通过最大似然拟合单变量分布。数据可以是区间删失的。 vitality 包提供了用于拟合活力族死亡率模型中的模型的例程。
epi.insthaz
函数根据 Kaplan-Meier 估计量计算瞬时风险。survdiff
函数使用 Fleming-Harrington G-rho 测试族比较生存曲线。 NADA 为左删失数据实现了此类测试。SurvTest
将对数秩检验重新表述为线性秩检验。coxph
function in the survival package fits the Cox model. cph
in the rms package and the eha package propose some extensions to the coxph
function. The package coxphf implements the Firth’s penalised maximum likelihood bias reduction method for the Cox model. An implementation of weighted estimation in Cox regression can be found in coxphw. The coxrobust package proposes a robust implementation of the Cox model. timecox
in package timereg fits Cox models with possibly time-varying effects. A Cox model model can be fitted to data from complex survey design using the svycoxph
function in survey. The multipleNCC package fits Cox models using a weighted partial likelihood for nested case-control studies. The ICsurv package fits Cox models for interval-censored data through an EM algorithm. The dynsurv package fits time-varying coefficient models for interval censored and right censored survival data using a Bayesian Cox model, a spline based Cox model or a transformation model. The OrdFacReg package implements the Cox model using an active set algorithm for dummy variables of ordered factors. The survivalMPL package fits Cox models using maximum penalised likelihood and provide a non parametric smooth estimate of the baseline hazard function. A Cox model with piecewise constant hazards can be fitted using the pch package. The icenReg package implements several models for interval-censored data, e.g., Cox, proportional odds, and accelerated failure time models. A Cox type Self-Exciting Intensity model can be fitted to right-censored data using the coxsei package. The SurvLong contains methods for estimation of proportional hazards models with intermittently observed longitudinal covariates. The plac package provides routines to fit the Cox model with left-truncated data using augmented information from the marginal of the truncation times. The boot.pval package contains the convenience function censboot_summary
for computing bootstrap p-values and confidence intervals for Cox models.cox.zph
函数检查比例假设。 clinfun 中的 coxphCPE
函数计算 Cox 模型的一致性概率估计。 后者包中的 coxphQuantile
绘制生存分布的 quantile 曲线作为协变量的函数。 multcomp 包计算 Cox 模型和其他参数生存模型的同步检验和置信区间。 lsmeans 包允许从线性模型中获得最小二乘均值(及其对比)。 特别是,它为 coxph
、survreg
和 coxme
函数提供支持。 Bioconductor 上的 multtest 包提出了一种基于重采样的多重假设检验,可以应用于 Cox 模型。 使用带有方差的 sandwich 估计量的 Wald 检验测试 Cox 回归模型的系数可以使用 saws 包完成。 rankhazard 包允许绘制比例风险模型中协变量相对重要性的可视化。 smoothHR 包提供风险比曲线,允许预测变量和生存之间存在非线性关系。 PHeval 包提出使用标准化得分过程来检查比例风险假设的工具。 ELYP 包实现了 Cox 模型和 Yang-Prentice (2005) 模型的经验似然分析。survreg
(来自 survival)拟合参数比例风险模型。 eha 和 mixPHM 包实现了具有参数基线风险的比例风险模型。 rms 中的 pphsm
将 AFT 模型转换为比例风险形式。 polspline 包包含 hare
函数,该函数拟合风险回归模型,使用样条曲线对基线风险进行建模。风险可以是比例的,也可以不是比例的。 flexsurv 包实现了 Royston 和 Parmar (2002) 的模型。该模型使用自然三次样条曲线表示基线生存函数,并使用比例风险、比例优势或概率函数进行回归。 SurvRegCensCov 包允许估计右删失终点的 Weibull 回归,一个区间删失协变量和任意数量的非删失协变量。survreg
函数可以拟合加速失效时间模型。 rms 包中实现了 survreg
的修改版本(psm
函数)。它允许使用一些 rms 功能。 eha 包还提供了 AFT 模型的实现(函数 aftreg
)。 NADA 包为左删失数据提供了 survreg
函数的前端。 simexaft 包实现了 AFT 模型的模拟外推算法,当协变量受到测量误差时可以使用该算法。在 RobustAFT 中可以找到加速失效时间模型的稳健版本。 coarseDataTools 包拟合区间删失数据的 AFT 模型。 imputeYn (已存档) 包提出了 AFT 模型中参数估计的替代加权方案。 aftgee 包实现了最近开发的 AFT 模型推断程序,包括基于秩的方法和最小二乘方法。 boot.pval 包包含方便函数 censboot_summary
,用于计算 AFT 模型的引导 p 值和置信区间。aareg
和 aalen
中拟合了 Aalen 的加性风险模型。 timereg 还提供了 Cox-Aalen 模型的实现(也可以用于执行 Lin、Wei 和 Ying (1994) 的 Cox 回归模型拟合优度检验)以及 McKeague 和 Sasieni 的部分参数加性风险模型。 uniah 包拟合形状受限的加性风险模型。 addhazard 包包含用于将加性风险模型拟合到随机抽样、两阶段抽样和具有辅助信息的兩階段抽樣的工具。bj
函数和 emplik 中的 BJnoint
计算 Buckley-James 模型,但后者不包含截距项。 bujar 包拟合具有高维协变量的 Buckley-James 模型(L2 boosting、回归树和 boosted MARS、弹性网络)。survreg
can fit other types of models depending on the chosen distribution, e.g. , a tobit model. The AER package provides the tobit
function, which is a wrapper of survreg
to fit the tobit model. An implementation of the tobit model for cross-sectional data and panel data can be found in the censReg package. The timereg package provides implementation of the proportional odds model and of the proportional excess hazards model. The invGauss package fits the inverse Gaussian distribution to survival data. The model is based on describing time to event as the barrier hitting time of a Wiener process, where drift towards the barrier has been randomized with a Gaussian distribution. The pseudo package computes the pseudo-observation for modelling the survival function based on the Kaplan-Meier estimator and the restricted mean. flexsurv fits parametric time-to-event models, in which any parametric distribution can be used to model the survival probability, and where any of the parameters can be modelled as a function of covariates. The Icens
function in package Epi provides a multiplicative relative risk and an additive excess risk model for interval-censored data. The VGAM package can fit vector generalised linear and additive models for censored data. The gamlss.cens package implements the generalised additive model for location, scale and shape that can be fitted to censored data. The locfit.censor
function in locfit produces local regression estimates. The crq
function included in the quantreg package implements a conditional quantile regression model for censored data. The JM package fits shared parameter models for the joint modelling of a longitudinal response and event times. The temporal process regression model is implemented in the tpr package. Aster models, which combine aspects of generalized linear models and Cox models, are implemented in the aster and aster2 packages. The concreg (archived) package implements conditional logistic regression for survival data as an alternative to the Cox model when hazards are non-proportional. The surv2sampleComp packages proposes some model-free contrast comparison measures such as difference/ratio of cumulative hazards, quantiles and restricted mean. The rstpm2 package provides link-based survival models that extend the Royston-Parmar models, a family of flexible parametric models. The TransModel package implements a unified estimation procedure for the analysis of censored data using linear transformation models. The ICGOR fits the generalized odds rate hazards model to interval-censored data while GORCure generalized odds rate mixture cure model to interval-censored data. The thregI package permits to fit a threshold regression model for interval-censored data based on the first-hitting-time of a boundary by the sample path of a Wiener diffusion process. The miCoPTCM package fits semiparametric promotion time cure models with possibly mis-measured covariates. The smcure package permits to fit semiparametric proportional hazards and accelerated failure time mixture cure models. The case-base sampling approach for fitting flexible hazard regression models to survival data with single event type or multiple competing causes via logistic and multinomial regression can be found in package casebase. The intsurv package fits regular Cox cure rate model via an EM algorithm, regularized Cox cure rate model with elastic net penalty, and weighted concordance index for cure models. The GJRM package supports univariate proportional hazard, proportional odds and probit link models where the baseline and many types of covariate effects (including spatial and time-dependent effects) are modelled flexibly by means of penalised smoothers (e.g., penalised thin plate, monotonic B- and cubic splines, tensor products and Markov random fields). Right, left and interval censoring and left truncation can also be accounted for. This is done through the function gamlss
.coxph
function from package survival can be fitted for any transition of a multistate model. It can also be used for comparing two transition hazards, using correspondence between multistate models and time-dependent covariates. Besides, all the regression methods presented above can be used for multistate models as long as they allow for left-truncation. The mvna package provides convenient functions for estimating and plotting the cumulative transition hazards in any multistate model, possibly subject to right-censoring and left-truncation. The etm package estimates and plots transition probabilities for any multistate models. It can also estimate the variance of the Aalen-Johansen estimator, and handles left-truncated data. The mstate package permits to estimate hazards and probabilities, possibly depending on covariates, and to obtain prediction probabilities in the context of competing risks and multistate models. The flexsurv package can fit and predict from fully-parametric multistate models, with arbitrarily-flexible time-to-event distributions, using either a cause-specific hazards or mixture model framework. The msm package contains functions for fitting general continuous-time Markov and hidden Markov multistate models to longitudinal data. Transition rates and output processes can be modelled in terms of covariates. The msmtools package provides utilities to facilitate the modelling of longitudinal data under a multistate framework using the msm package. The flexmsm package provides a general estimation framework for multi-state Markov processes with flexible specification of the transition intensities. It supports any type of process structure (forward and backward transitions, any number of states) and transition intensities can be specified via Generalised Additive Models, with syntax similar to that used for GAMs in R. The SemiMarkov package can be used to fit semi-Markov multistate models in continuous time. The distribution of the waiting times can be chosen between the exponential, the Weibull and exponentiated Weibull distributions. The TPmsm package permits to estimate transition probabilities of an illness-death model or three-state progressive model. The gamboostMSM package extends the mboost package to estimation in the mulstistate model framework, while the penMSM package proposes L1 penalised estimation. The TP.idm package implement the estimator of Una-Alvarez and Meira-Machado (2015) for non-Markov illness-death models.survfit
) and prodlim can also be used to estimate the cumulative incidence function. The NPMLEcmprsk package implements the semi-parametric mixture model for competing risks data. The CFC package permits to perform Bayesian, and non-Bayesian, cause-specific competing risks analysis for parametric and non-parametric survival functions. The gcerisk package provides some methods for competing risks data. Estimation, testing and regression modeling of subdistribution functions in the competing risks setting using quantile regressions can be had in cmprskQR. The intccr package permits to fit the Fine and Gray model as well other models that belong to the class of semiparametric generalized odds rate transformation models to interval-censored competing risks data. The mmcif fits mixed cumulative incidence function models to model within-cluster dependence of both risk and timing.coxph
可用于分析重复事件数据。 rms 包的 cph
函数拟合 Anderson-Gill 重复事件模型,该模型也可以使用 frailtypack 包拟合。 后者还允许拟合用于联合建模重复事件和终点事件的联合脆弱性模型。 condGEE 包实现了用于重复事件间隙时间的条件 GEE。 reda 包提供了函数来拟合伽马脆弱性模型,该模型使用分段常数或样条作为重复事件数据的基线速率函数,以及一些用于重复事件数据的杂项函数。 reReg 包实现了用于重复事件数据的几种回归模型。 spef 包包含用于拟合面板计数生存数据的半参数回归模型的函数。rs.surv
计算相对生存曲线。 rs.add
拟合加性模型,rsmul
拟合 Andersen 等人的 Cox 模型。 用于相对生存,而 rstrans
拟合变换时间中的 Cox 模型。coxph
函数中添加。混合效应 Cox 模型在 coxme 包中实现。 timereg 包中的 two.stage
函数拟合 Clayton-Oakes-Glidden 模型。 frailtypack 包使用对风险函数的惩罚似然,对具有共享 Gamma 脆弱性的右删失和/或左截断数据拟合比例风险模型。该包还拟合了可用于例如荟萃分析和分层聚类数据(具有 2 个聚类级别)的加性脆弱性和嵌套脆弱性模型。使用 h 似然估计脆弱性项的 Cox 模型可以使用 frailtyHL 包拟合。 frailtySurv 包在各种脆弱性分布下模拟和拟合半参数共享脆弱性模型。 PenCoxFrail 包通过惩罚为 Cox 脆弱性模型提供正则化方法。 mexhaz 使得能够对具有时间依赖和/或非线性效应的超额风险回归模型进行建模,并在聚类级别定义随机效应。 frailtyEM 包包含用于使用期望最大化算法拟合具有半参数基线风险的共享脆弱性模型的函数。支持的数据格式包括具有左截断的聚类失效以及间隙时间或 Andersen-Gill 格式的重复事件多元生存是指对单位的分析,例如双胞胎或家庭的生存。为了分析此类数据,我们可以估计生存时间的联合分布
NMixMCMC
在 mixAK 中对删失数据的正态混合进行 MCMC 估计。MCMCtobit
对具有左删失、右删失或区间删失数据的正态线性回归进行 MCMC 拟合。weibullregpost
函数在 LearnBayes 中计算 Weibull 比例优势回归模型的对数后验密度。本节尝试列出一些在事件历史分析中可能很有用的专用绘图函数。
plot.Hist
function in prodlim 允许绘制表征多状态模型的状态和转换。ggsurvplot
,用于绘制带有“风险人数”表的生存曲线。其他函数也可用于对 Cox 模型假设进行视觉检查。censboot
函数,该函数实现了针对右删失数据的几种类型的引导技术。 boot.pval 包包含方便函数 censboot_summary
,用于计算 Cox 模型和加速失效时间模型的引导 p 值和置信区间。