Residual diagnostic methods play a critical role in assessing model assumptions and detecting outliers in statistical modelling. In the context of survival models with censored observations, Li et al. (2021) introduced the Z-residual, which follows an approximately normal distribution under the true model. This property makes it possible to use Z-residuals for diagnosing survival models in a way similar to how Pearson residuals are used in normal regression. However, computing residuals based on the full dataset can result in a conservative bias that reduces the power of detecting model mis-specification, as the same dataset is used for both model fitting and validation. Although cross-validation is a potential solution to this problem, it has not been commonly used in residual diagnostics due to computational challenges. In this paper, we propose a cross-validation approach for computing Z-residuals in the context of shared frailty models. Specifically, we develop a general function that calculates cross-validatory Z-residuals using the output from the \texttt{coxph} function in the \texttt{survival} package in R.Our simulation studies demonstrate that, for goodness-of-fit tests and outlier detection, cross-validatory Z-residuals are significantly more powerful and more discriminative than Z-residuals without cross-validation. We also compare the performance of Z-residuals with and without cross-validation in identifying outliers in a real application that models the recurrence time of kidney infection patients. Our findings suggest that cross-validatory Z-residuals can identify outliers that are missed by Z-residuals without cross-validation.
翻译:残差诊断方法在统计建模中对于检验模型假设和检测异常值具有关键作用。在包含删失观测的生存模型背景下,Li等人(2021)提出了Z残差,该残差在真实模型下近似服从正态分布。这一特性使得Z残差可以像正态回归中使用Pearson残差那样用于诊断生存模型。然而,基于完整数据集计算残差会产生保守性偏差,降低检测模型错误设定的能力,因为同一数据集同时用于模型拟合与验证。尽管交叉验证是解决此问题的潜在方案,但由于计算挑战,其在残差诊断中尚未被广泛采用。本文针对共享脆弱模型提出了一种计算Z残差的交叉验证方法。具体而言,我们开发了一个通用函数,该函数利用R中survival包的coxph函数输出计算交叉验证Z残差。模拟研究表明,在拟合优度检验和异常值检测方面,交叉验证Z残差比非交叉验证Z残差具有显著更强的功效和鉴别力。我们还在一个实际应用中比较了有无交叉验证的Z残差在识别肾脏感染患者复发时间模型中异常值的表现。研究结果表明,交叉验证Z残差能够识别非交叉验证Z残差遗漏的异常值。