Background and Objective <p>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.</p> Methods <p>Three case types were classified according to the positioning of the given cumulative survival estimate “<InlineEquation ID="IEq1"> <EquationSource Format="TEX">\({S}_{*}\)</EquationSource> <EquationSource Format="MATHML"><math> <mmultiscripts> <mi>S</mi> <mrow> <mrow /> <mo>∗</mo> </mrow> <mrow /> </mmultiscripts> </math></EquationSource> </InlineEquation>” between cumulative survival probabilities corresponding to the boundary knots from the Royston/Parmar restricted cubic spline model to determine the positioning of the solution “<i>t</i>” between knot values. For Case 1 (<i>t</i> before first knot) and Case 3 (<i>t</i> after last knot), a linear equation for <InlineEquation ID="IEq2"> <EquationSource Format="TEX">\(x=\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>x</mi> <mo>=</mo> </mrow> </math></EquationSource> </InlineEquation> ln(<i>t</i>) is produced, and single solutions are derived for <i>t</i> as a function of <InlineEquation ID="IEq3"> <EquationSource Format="TEX">\({S}_{*}\)</EquationSource> <EquationSource Format="MATHML"><math> <mmultiscripts> <mi>S</mi> <mrow> <mrow /> <mo>∗</mo> </mrow> <mrow /> </mmultiscripts> </math></EquationSource> </InlineEquation>. For Case 2 (between boundary knots), a cubic equation of the form <i>a</i><InlineEquation ID="IEq4"> <EquationSource Format="TEX">\(x\)</EquationSource> <EquationSource Format="MATHML"><math> <mi>x</mi> </math></EquationSource> </InlineEquation><sup>3</sup> + <i>b</i> <InlineEquation ID="IEq5"> <EquationSource Format="TEX">\(x\)</EquationSource> <EquationSource Format="MATHML"><math> <mi>x</mi> </math></EquationSource> </InlineEquation><sup>2</sup> + <i>c</i> <InlineEquation ID="IEq6"> <EquationSource Format="TEX">\(x\)</EquationSource> <EquationSource Format="MATHML"><math> <mi>x</mi> </math></EquationSource> </InlineEquation> + <i>d</i> = 0 is derived, with a published cubic equation-solving algorithm used to obtain the correct solution for <i>t</i>. Royston/Parmar restricted cubic spline models were then fitted to published colon cancer data, and used to test the average execution speed of a user-defined function coded in Visual Basic for Applications (VBA)&#xa0;based on the analytical inversion solution compared to two Goal Seek approaches (default and increased precision) and a hybrid approach using Brent’s method in Microsoft Excel over 100 replications of event time simulations, for a range of given survival estimates between 1% and 99% for all fitted models.</p> Results <p>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.</p> Conclusions <p>Analytical 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.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Deriving an Analytical Solution to Inversion of Royston/Parmar Restricted Cubic Spline Parametric Survival Models for Discrete Event Simulation

  • George Bungey,
  • Jorgen Moller,
  • James Saunders,
  • Venediktos Kapetanakis

摘要

Background and Objective

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.

Methods

Three case types were classified according to the positioning of the given cumulative survival estimate “ \({S}_{*}\) S ” between cumulative survival probabilities corresponding to the boundary knots from the Royston/Parmar restricted cubic spline model to determine the positioning of the solution “t” between knot values. For Case 1 (t before first knot) and Case 3 (t after last knot), a linear equation for \(x=\) x = ln(t) is produced, and single solutions are derived for t as a function of \({S}_{*}\) S . For Case 2 (between boundary knots), a cubic equation of the form a \(x\) x 3 + b \(x\) x 2 + c \(x\) x + d = 0 is derived, with a published cubic equation-solving algorithm used to obtain the correct solution for t. Royston/Parmar restricted cubic spline models were then fitted to published colon cancer data, and used to test the average execution speed of a user-defined function coded in Visual Basic for Applications (VBA) based on the analytical inversion solution compared to two Goal Seek approaches (default and increased precision) and a hybrid approach using Brent’s method in Microsoft Excel over 100 replications of event time simulations, for a range of given survival estimates between 1% and 99% for all fitted models.

Results

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.

Conclusions

Analytical 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.