nph_traj: Calculate analytic time-to-event trial properties under...

Description Usage Arguments Value Author(s) References Examples

View source: R/nph_traj.R

Description

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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
nph_traj(
  active_ecurve,
  control_ecurve,
  active_dcurve = Blank(),
  control_dcurve = Blank(),
  rcurve,
  max_assessment = 100,
  landmark = NULL,
  RMST = NULL,
  alpha1 = 0.025,
  required_power = NULL,
  detailed_output = FALSE
)

Arguments

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

Value

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

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

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

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

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

Author(s)

James Bell

References

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.

Examples

1
2
nph_traj(max_assessment=100,rcurve=LinearR(12,100,100),control_ecurve=Weibull(100,1),
active_ecurve=Weibull(250,0.8))

gestate documentation built on Feb. 20, 2020, 5:08 p.m.