Cytel-Inc / CyneRgy

CyneRgy is a package designed to illustrate the synergy of using R with Cytel products for clinical trial simulation.
https://cytel-inc.github.io/CyneRgy/
2 stars 0 forks source link

CumEvents inputs in R connection doesn't contain accurate information #184

Open Anoopsinghrawat opened 3 months ago

Anoopsinghrawat commented 3 months ago

This bug causes the values of CumEvents for a TTE design to show incorrectly. We have the following workaround currently -

  1. User can generate CumEvents inside their R function using MaxEvents and InfoFraction as follows - CumEvents = LookInfo$InfoFrac*DesignParam$MaxEvents
  2. Use CumCompleters in place of CumEvents.

Once this bug is fixed, the following changes need to be made -

  1. inst/Templates/Analyze.TimeToEvent.R file - Replace all instances of CumCompleters with CumEvents including in docstring and function body.
  2. inst/Examples/2ArmTimeToEventOutcomeAnalysis/RCode - Replace all instances of CumCompleters with CumEvents in all the examples in this folder.

Here's a brief description of CumCompleters and CumEvents as they apply to East Horizon engines For Binary and Continuous endpoints

  1. CumCompleters - Cumulative completors at each look. These are total subjects who have given a response by the time of each look.
  2. CumEvents - Not applicable

For Time to event endpoint

  1. CumEvents - Cumulative events at each look. These are total subjects who have given an event by the time of each look.
  2. CumCompleters - Concept of cumulative completers is not applicable for a Time to event endpoint in our engine. In R connection, CumCompleters field is a copy of CumEvents. However, due to a bug, CumEvents doesn't correctly capture the cumulative events values. CumCompleters is not affected by this bug so the user can use it in place of CumEvents as a workaround.
Anoopsinghrawat commented 2 months ago

This issue is fixed by the engine team via https://cytel1.atlassian.net/browse/PLATFORM-27928 and should be available through the next release. @kwathen