You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Though it is under equal randomization, the statistical information under H0 is not event/4.
Root cause
The root cause lies in gs_info_ahr. Although the sample size is integer (denoted as N), the sum(enroll_rate$rate * enroll_rate$duration) may not be N anymore, but close enough to N.
y = gs_info_ahr(enroll_rate = xi$enroll_rate,
fail_rate = xi$fail_rate,
ratio = xi$input$ratio,
event = 342, # FA events
analysis_time = NULL)
Reasons
When calling gs_info_ahr() given event without analysis_time, it will
First calculate the expected time to get the event using the expected_time() function.
Then it calculates the statistical information given the above calculated expected time by ahr() function.
The ahr() function calculate the statistcial information based on enroll_rate, fail_rate, total_duration and ratio.
There is a problem with the enroll_rate!!!
The planned relative enroll rate is c(1, 2, 3, 4), with a sample size of (c(1, 2, 3, 4) * c(2, 2, 2, 6)) |> sum() = 36. Since the integer sample size is 386, we inflate the planned relative enroll rate as 386 / 36 * c(1, 2, 3, 4).
Though it is theoretically true that 386/36 * c(1, 2, 3, 4) * c(2, 2, 2, 6) = 386, this may not hold in numerical software calculation.
Problem overview
The following lines of code generate a integer design, i.e., integer events and sample size as multiplier of 2.
Though it is under equal randomization, the statistical information under H0 is not event/4.
Root cause
The root cause lies in
gs_info_ahr
. Although the sample size is integer (denoted as N), thesum(enroll_rate$rate * enroll_rate$duration)
may not be N anymore, but close enough to N.Reasons
When calling
gs_info_ahr()
givenevent
withoutanalysis_time
, it willevent
using theexpected_time()
function.ahr()
function.ahr()
function calculate the statistcial information based onenroll_rate
,fail_rate
,total_duration
andratio
.enroll_rate
!!!The planned relative enroll rate is
c(1, 2, 3, 4)
, with a sample size of(c(1, 2, 3, 4) * c(2, 2, 2, 6)) |> sum() = 36
. Since the integer sample size is 386, we inflate the planned relative enroll rate as386 / 36 * c(1, 2, 3, 4)
.Though it is theoretically true that
386/36 * c(1, 2, 3, 4) * c(2, 2, 2, 6) = 386
, this may not hold in numerical software calculation.Possible solution
Some references from gsDesign:
The text was updated successfully, but these errors were encountered: