Skip to contents

Introduction

The following examples illustrate how to integrate new analysis capabilities into East Horizon using R functions in the context of multi-arm clinical trials. Each example demonstrates a different type of statistical endpoint (continuous, time-to-event, and binary), using standard R functions and a Bonferroni adjustment to handle multiple comparisons.

In the R directory of this example you will find the following R files:

  1. AnalyzeMultiArmUsingTTestBonferroni.R - Performs pairwise t-tests for continuous endpoints with Bonferroni adjustment.

  2. AnalyzeMultiArmUsingPropTestBonferroni.R - Performs proportion tests for binary endpoints with Bonferroni adjustment.

  3. AnalyzeMultiArmUsingLogrankTestBonferroni.R - Performs log-rank tests for time-to-event endpoints with Bonferroni adjustment.

Example 1 - Using the t.test() Function with Bonferroni Adjustment (Continuous Outcome)

This example uses R’s built-in t.test() function to compare continuous outcomes between each treatment arm and the control arm. The function computes individual p-values for each comparison, applies a Bonferroni adjustment to control the family-wise error rate, and then checks whether any adjusted p-values cross the efficacy boundaries defined by East Horizon.

At each interim or final analysis, only active arms are tested (based on IsArmPresent). The analysis is compatible with both fixed and group sequential designs.

The figure below illustrates where this example fits within the R integration points of Cytel products, accompanied by a flowchart outlining the general steps performed by the R code.

Example 2 - Using the prop.test() Function with Bonferroni Adjustment (Binary Outcome)

This example analyzes binary outcomes using R’s base prop.test() function. The test compares the proportion of responders in each treatment arm against the control arm, computes p-values for each test, and applies Bonferroni correction to account for multiple arms. Adjusted p-values are compared against efficacy boundaries to decide whether any arm demonstrates a statistically significant treatment effect.

The analysis dynamically accounts for dropped arms and adapts to both fixed and group sequential designs.

The figure below illustrates where this example fits within the R integration points of Cytel products, accompanied by a flowchart outlining the general steps performed by the R code.

Example 3 - Using the survival Package with Bonferroni-Adjusted Log-Rank Tests (Time-to-Event Outcome)

For time-to-event outcomes, this example analyzes a multi-arm survival trial by comparing each active treatment arm with the control arm. It uses survival::survdiff() to perform pairwise log-rank tests and estimates treatment-versus-control hazard ratios using Cox proportional hazards models.

For each active treatment arm, the raw log-rank p-value is adjusted using a Bonferroni correction based on the number of active arms. The adjusted p-value is then compared with the applicable efficacy boundary to determine whether the treatment crosses for efficacy, continues to the next analysis, or is declared futile at the final analysis.

The example supports both fixed-sample and group sequential designs. For interim analyses, it uses LookInfo to determine the current information fraction and efficacy boundary. Patients are administratively censored at the analysis time corresponding to the planned number of events for the current look.

The figure below illustrates where this example fits within the R integration points of Cytel products, accompanied by a flowchart outlining the general steps performed by the R code.