Deriving an Analytical Solution to Inversion of Royston/Parmar Restricted Cubic Spline Parametric Survival Models for Discrete Event Simulation
摘要
Discrete event simulation models simulate times to events rather than using the cumulative survival probabilities provided by parametric survival models. This requires inversion of the survival functions to produce analytical solutions to derive these event times from given survival estimates. While numerical methods can approximate event times for more complex survival models, this process may be computationally expensive, especially when repeated over large numbers of simulations. We aimed to derive an analytical solution to inverse functions for Royston/Parmar restricted cubic spline parametric survival models and test the execution speed when implemented in Microsoft Excel against numerical approximation methods (Goal Seek) and a hybrid approach using Brent’s root-solving algorithm.
MethodsThree case types were classified according to the positioning of the given cumulative survival estimate “
The mean (standard deviation) execution speed for the spline inversion user-defined function across 100 replications was 0.612 (0.029) seconds compared with 10.567 (0.175) seconds for the default Goal Seek approach, 12.230 (0.265) seconds for the increased precision Goal Seek approach and 1.140 (0.114) seconds for the hybrid Brent method, corresponding to 94.2%, 95.0%, and 46.3% reductions in average execution time, respectively.
ConclusionsAnalytical solutions to inverse functions of Royston/Parmar restricted cubic spline models can be derived to allow precise estimation of event times from given survival estimates and substantially increase simulation speed for event time generation in Microsoft Excel for discrete event simulation versus approximations using numerical methods, as well as facilitate derivation of a quantile function. Further research should be considered to test event time derivation speed in other software (such as R), extend the solution to time-varying covariates and identify other potential use cases for the analytical inversion solution.