R Integration in East

 

R Integration in East Simulation

You can integrate and execute R scripts, specifically tailored for R version 4.1.3. This integration allows for advanced data analysis and visualization directly within simulations in East. The following tasks include R integration.

 

Endpoint Study Design Task Category
Initial-ization Generate Resp-onse Rando-mize Subjects Generate Arrival Times Generate Drop-out Information Compute Test Statistic Re-Estimate Events Adapt Test Statistics Treatment Selection Survival Assu-rance
Survival Two Samples - Logrank Test Given Accrual Duration and Accrual Rates Yes Yes Yes Yes   Yes Yes Yes   Yes
Survival Two Samples - Logrank Test Given Accrual Duration and Study Duration Yes Yes Yes Yes Yes Yes Yes Yes   Yes
Continuous Two Samples - Difference of Means Yes Yes Yes Yes Yes Yes Yes      
Binary Two Samples - Difference of Proportion Yes Yes Yes Yes Yes Yes Yes      
Binary Two Samples - Ratio of Proportion Yes Yes Yes Yes Yes Yes Yes      
Binary Two Samples - Odds Ratio of Proportion Yes Yes Yes Yes Yes Yes        
Binary Many Samples - Chi Square for Specified Proportions in C Categories Yes Yes   Yes Yes Yes        
Binary Many Samples - Two Group Chi Square for Proportions in C Categories Yes Yes   Yes Yes Yes        
Continuous Multiple Looks - Combining P Values  Yes               Yes  
Binary Multiple Looks - Combining P Values Yes               Yes  
Survival Multiple Looks - Combining P Values Yes               Yes  

 

How to Enable R Integration
  1. Navigate to the "Include Options" section by clicking the button on the right top corner in the Simulation input window and select the “User Defined R Function“ option.
  2. A list of possible “Tasks” will appear.
  3. For the desired Task, place the cursor in the “File Name“ field and click “Browse“ to select the desired user defined R file. The path will then be shown in the “File Name“ field.
  4. To copy the function's name from the R function, click “View“ in the simulation input after clicking the “Function name” field.
  5. Click the Simulate button to execute the simulation including custom functions in the R script.
Custom Variables in R Connection
  1. To include relevant variables from your custom user defined R function, select the desired Task and click "Add/Edit Variables"
  2. Provide the appropriate information for "Variable Name" and "Variable Value" that aligns with your R function.
  3. Computations will now proceed inclusive of your custom R functions.
  4. Click the Simulate button to execute the R script with the newly defined custom variable(s).
Special cases
  • Assurance (Probability of success): Select the checkbox, then under the distribution section, choose the user-specified R function option.
Assurance- user-specified R function
  • Adapt test statistic and re-estimate completers/events: When simulating, click on SSR (which adapts the test statistic and re-estimates completers/events) and then select the R function from the options. The process should also work if the R function is selected before clicking SSR.
SSR R function
  • MAMS designs: To select a treatment using MAMS designs, click the "Use R for Treatment Selection" checkbox to activate R integration.
MAMS designs R integration

 

See Also



East Hosted
General
Product Features, R Code, R Connection
Concept
Rate this content
No votes yet
Comments?