
Integration Point: Analysis
Gabriel Potvin
January 16, 2025
IntegrationPointAnalysis.Rmd
Go back to the Getting Started: Overview page
Description
The Analysis integration point allows you to customize the statistical test for the treatment effect using a custom R script. This flexibility enables you to implement methods that better align with your trial’s specific needs, rather than relying on the built-in default statistical tests. For example:
- Continuous outcomes: Instead of using the default difference of means, you could provide a script for alternative approaches such as the ratio of means or a test from the Wilcoxon-Mann-Whitney family.
- Binary outcomes: Instead of the default difference of proportions, you could implement methods such as the ratio of proportions, odds ratio, risk ratio, or other suitable measures.
- Time-to-Event outcomes: Instead of the default Logrank test, you could include scripts for alternative approaches like the Peto-Peto test, which emphasizes early events, or a restricted mean survival time (RMST)-based test, which describes the mean event-free survival time up to a pre-selected time point.
Availability
East Horizon Explore
This integration point is available in East Horizon Explore for the following study objectives and endpoint types:
- Two Arm Confirmatory: continuous, continuous with repeated measures, binary, and time-to-event outcomes.
- Two Arm Confirmatory: dual time-to-event/time-to-event, dual time-to-event/binary outcomes. Coming soon
- Multiple Arm Confirmatory: continuous and binary outcomes. Coming soon
East Horizon Design Coming soon
This integration point will be available in East Horizon Design in the future.
East
This integration point is available in East for the following tests (click to expand/collapse):
- Design, Continuous Endpoint
- Two-Sample Test, Parallel Design, Difference of Means (MN-2S-DI)
- Design, Discrete Endpoint
- Two-Sample Test, Parallel Design
- Difference of Proportions (PN-2S-DI)
- Ratio of Proportions (PN-2S-RA)
- Odds Ratio of Proportions (PN-2S-OR)
- Many-Sample Test
- Single Arm Design, Chi-Square for Specified Proportions in C Categories (PN-ns-CH1C)
- Parallel Design, Two Group Chi-Square for Specified Proportions in C Categories (PN-ns-CH2C)
- Two-Sample Test, Parallel Design
- Design, Survival Endpoint
- Two-Sample Test, Parallel Design
- Logrank Given Accrual Duration and Accrual Rates (SU-2S-LRAR)
- Logrank Given Accrual Duration and Study Duration (SU-2S-LRSD)
- Two-Sample Test, Parallel Design
Instructions
In East Horizon Explore
You can set up an analysis function in East Horizon Explore under Test or Test Statistic in a Design Card while creating or editing an Input Set.
Follow these steps (click to expand/collapse):
- Select User Specified-R from the dropdown in the Test field in the Design Card.
- Browse and select the appropriate R file (
filename.r
) from your computer, or use the built-in R Code Assistant to create one. This file should contain function(s) written to perform various tasks to be used throughout your Project. - Choose the appropriate function name. If the expected function is not displaying, then check your R code for errors.
- Set any required user parameters (variables) as needed for your function using + Add Variables.
- Continue creating your project.
For a visual guide of where to find the option, refer to the screenshots below:
For Time-to-event outcomes, the option is available under General in the Test Statistic field.

In East
You can set up an enrollment function in East by navigating to the Compute Test Statistic task of the User Defined R Function tab of a Simulation Input window, after including the option.
Follow these steps (click to expand/collapse):
- Choose the appropriate test in the Design tab.
- If you see the Design Input window, compute the scenario using the Compute button, save the design using the Save in Workbook button, then navigate to the Simulation Input window by clicking on the Simulate Design button under Library.
- Click on the Include Options button on the top right corner of the Simulation Input window and select both Accrual / Dropouts and User Defined R Function.
- In the tab User Defined R Function, a list of tasks will appear. Place your cursor in the File Name field for the task Compute Test Statistic.
- Click on the button Browse… to select the
appropriate R file (
filename.r
) from your computer. This file should contain function(s) written to perform various tasks to be used throughout your Project. - Specify the function name you want to initialize. To copy the function’s name from the R script, click on the button View.
- Set any required user parameters (variables) as needed for your function using the button Add/Edit Variables.
- Continue setting up your project.
For a visual guide of where to find the option, refer to the screenshot below: