Description Usage Arguments Value Author(s) References Examples

This function calculates the expected parameters/outputs/properties for a two-arm Time-To-Event trial under complex assumptions.
It is designed to work with non-proportional hazards and ought to be able to accommodate any distributional assumptions for
events, censoring and recruitment, so long as they are correctly detailed in Curve or RCurve objects.

The function performs power calculations and hence can be used for sample size planning. By creating trajectories of properties
over time, the function also assists with identifying the optimum assessment time.

The function uses numerical integration across event, censoring and recruitment functions to estimate observed and expected event numbers.
From these, it estimates an expected HR, with the same interpretation as that found using Cox regression, using the Pike method.
The estimated event numbers and HR can be used to calculate power by one of several methods, including the Schoenfeld and Frontier methods.
A separate, direct, power calculation can also be performed using the log-rank test formula and its Z-distribution.

To assist sample size finding, the function will also optionally estimate the required sample size to reach a given power
keeping all variables other than recruitment.

Expected RMST and landmark analysis properties may also be calculated. This also uses numerical integration techniques.
Power is also then estimated for such analyses.

1 2 3 4 5 6 7 8 9 10 11 12 13 |

`active_ecurve` |
Event distribution for the active arm, specified as a Curve object |

`control_ecurve` |
Event distribution for the control arm, specified as a Curve object |

`active_dcurve` |
Dropout/censoring distribution for the active arm, specified as a Curve object. By default, a Blank() object, i.e. no dropout. |

`control_dcurve` |
Dropout/censoring distribution for the control arm, specified as a Curve object. By default, a Blank() object, i.e. no dropout. |

`rcurve` |
Recruitment distribution, specified as an RCurve object |

`max_assessment` |
Maximum assessment time to calculate properties up to |

`landmark` |
(Optional) Time in months of landmark analysis, if required. Otherwise NULL (Not calculated; default). |

`RMST` |
(Optional) Restriction time for RMST analysis in months, if required. Otherwise NULL (Not calculated; default). |

`alpha1` |
One-sided alpha required, as a decimal. 0.025 by default. Requires 0 < alpha1 <= 0.5. |

`required_power` |
(Optional) Power required for estimated sample sizes. Otherwise NULL (not calculated; default). |

`detailed_output` |
Boolean to require a more detailed output table, including Peto LogHR, expectations of various quantities and alternative power calculations. Default = FALSE (detailed outputs omitted). |

Returns a table with one row per assessment time. Table contains both all input parameters as well as the following expected quantities:

"Time" Time at which the assessment is made

"Patients" Number of patients expected to be recruited to date

"Events_Active" Expected number of observed events in active arm

"Events_Control" Expected number of observed events in control arm

"Events_Total" Expected number of events across both arms

"HR" Expected Hazard Ratio (using the Pike method)

"LogHR" Log of the expected Hazard Ratio

"LogHR_SE" SE of the log of the expected Hazard Ratio

"Schoenfeld_Power" Estimated power based on Schoenfeld formula

"Frontier_Power" Estimated power based on Frontier method, using estimated event ratio at 0.5 power

In addition, if the detailed_output argument is set to TRUE, the following additional columns are provided:

"E_Events_Active" Expected number of expected events in active arm

"E_Events_Control" Expected number of expected events in control arm

"HR_CI_Upper" Estimated Upper Bound of the CI for the Hazard Ratio

"HR_CI_Lower" Estimated Lower Bound of the CI for the Hazard Ratio

"Peto_LogHR" Expected Log Hazard Ratio using the Peto method

"Expected_Z" Estimated Z-score based on expected quantities for O, E and V, and log-rank test formula

"Expected_P" Estimated p-value based on estimated Z-score

"Log_Rank_Stat" Expected log-rank statistic

"Variance" Expected variance of LR-statistic by integration of V_function

"V_Pike_Peto" Expected variance based upon Pike and Peto approximations

"Event_Ratio" Expected ratio of events between arms; active divided by control

"Event_Prop_Power" Estimated power based on event proportion method, using event ratio rather than randomisation ratio

"Z_Power" Estimated power based on expected value of Z

If RMST calculations are requested, the following columns are included:

"RMST_Restrict" Specified RMST restriction time

"RMST_Active" Expected RMST for active arm

"RMST_Control" Expected RMST for control arm

"RMST_Delta" Absolute difference in expected RMSTs between arms (active minus control)

"RMST_SE" Estimated SE of the RMST delta

"RMST_Z" Estimated RMST Z score

"RMST_Failure" Estimated probability of RMST difference being uncomputable for the specified restriction time

"RMST_Power" Estimated RMST Power

If landmark calculations are requested, the following columns are included:

"LM_Time" Time of landmark analysis

"LM_Active" Expected Kaplan Meier estimate of active arm at landmark time

"LM_Control" Expected Kaplan Meier estimate of control arm at landmark time

"LM_Delta" Expected absolute difference in Kaplan Meiers estimates at landmark time (active-control)

"LM_A_SE" Estimated Greenwood SE for active arm at landmark time

"LM_C_SE" Estimated Greenwood SE for control arm at landmark time

"LM_D_SE" Estimated Greenwood SE for delta at landmark time

"LM_Z" Estimated landmark analysis Z-score based on Greenwood SE

"LM_Power" Estimated landmark analysis power based on Greenwood SE

If a required power is requested, the following column is included:

"Estimated_SS" Estimated sample size required, keeping constant all parameters other than rate of recruitment and total sample size

James Bell

Bell J, Accurate Sample Size Calculations in Trials with Non-Proportional Hazards, 2018, presentation at PSI Conference. https://www.psiweb.org/docs/default-source/default-document-library/james-bell-slides.pdf?sfvrsn=3324dedb_0 Bell J, Power Calculations for Time-to-Event Trials Using Predicted Event Proportions, 2019, paper under review. Ruehl J, Sample Size Calculation in Time-To-Event Trials with Non-Proportional Hazards Using GESTATE, 2018, BSc thesis at University of Ulm. Pike MC, Contribution to discussion in Asymptotically efficient rank invariant test procedures by Peto R and Peto J, Journal of the Royal Statistical Society Series A, 135(2), 201-203.

1 2 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.