6.3 Methods
In this Section I will introduce the models I fitted in this simulation study. I start by fitting a Cox model with a shared frailty term: \[
h_{ij}(t | \alpha_i) = \alpha_i h_0(t_{ij}) \exp(X_{ij} \beta),
\] with \(h_0(\cdot)\) left unspecified. The Cox model with a shared Gamma frailty is implemented in the R package frailtyEM
, while the Cox model with a shared log-normal frailty is implemented in the R package coxme
. Since the coxme
package does not return a standard error for the estimated frailty variance by default, I used bootstrap with 1000 replications to estimate it; I resampled clusters of individuals rather than individuals to preserve the correlation within a cluster. Then, I fitted fully parametric survival models with a shared frailty term, using the same model formulation of the Cox model but specifying the baseline hazard function. I fitted six models, for each combination of baseline hazard (Exponential, Weibull, or Gompertz) and frailty distribution (Gamma, log-normal). These models are implemented in the R package parfm
. Finally, I fitted flexible Royston-Parmar models with a shared frailty term, either Gamma or log-normal: \[
\log H(t_{ij}|\alpha_i) = s(z; \gamma) + X \beta + \log(\alpha_i),
\] with \(s(\cdot)\) a restricted cubic spline function of log-time that smooths the logarithm of the baseline cumulative hazard \(H_0(\cdot)\). This model requires choosing the number of degrees of freedom of the spline term, hence I varied between 3, 5, 7, and 9 degrees of freedom. I also fitted the same model using penalised likelihood (X. Liu, Pawitan, and Clements 2016), applying a penalty to the likelihood to avoid both overfitting and having to choose the number of degrees of freedom for the spline term. These flexible parametric models are implemented in the R package rstpm2
.
References
Liu, Xing-Rong, Yudi Pawitan, and Mark Clements. 2016. “Parametric and Penalized Generalized Survival Models.” Statistical Methods in Medical Research. doi:10.1177/0962280216664760.