Skip to contents

Based on piecewise enrollment rate, failure rate, and dropout rates computes approximate information and effect size using an average hazard ratio model.

Usage

gs_info_ahr(
  enrollRates = tibble::tibble(Stratum = "All", duration = c(2, 2, 10), rate = c(3, 6,
    9)),
  failRates = tibble::tibble(Stratum = "All", duration = c(3, 100), failRate =
    log(2)/c(9, 18), hr = c(0.9, 0.6), dropoutRate = rep(0.001, 2)),
  ratio = 1,
  events = NULL,
  analysisTimes = NULL
)

Arguments

enrollRates

enrollment rates

failRates

failure and dropout rates

ratio

Experimental:Control randomization ratio

events

Targeted minimum events at each analysis

analysisTimes

Targeted minimum study duration at each analysis

Value

a tibble with columns Analysis, Time, AHR, Events, theta, info, info0.

info, info0 contains statistical information under H1, H0, respectively. For analysis k, Time[k] is the maximum of analysisTimes[k] and the expected time required to accrue the targeted events[k]. AHR is expected average hazard ratio at each analysis.

Details

The AHR() function computes statistical information at targeted event times. The tEvents() function is used to get events and average HR at targeted analysisTimes.

Specification

The contents of this section are shown in PDF user manual only.

Examples

library(gsDesign)
library(gsDesign2)

# ------------------------ #
#       Example 1          #
# ------------------------ #
# Only put in targeted events
gs_info_ahr(events = c(30, 40, 50))
#> # A tibble: 3 × 7
#>   Analysis  Time Events   AHR theta  info info0
#>      <int> <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1        1  14.9   30.0 0.787 0.240  7.37  7.50
#> 2        2  19.2   40.0 0.744 0.295  9.79 10.0 
#> 3        3  24.5   50.0 0.713 0.339 12.2  12.5 

# ------------------------ #
#       Example 2          #
# ------------------------ #
# Only put in targeted analysis times
gs_info_ahr(analysisTimes = c(18, 27, 36))
#> # A tibble: 3 × 7
#>   Analysis  Time Events   AHR theta  info info0
#>      <int> <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1        1    18   37.6 0.755 0.282  9.21  9.40
#> 2        2    27   54.0 0.704 0.351 13.2  13.5 
#> 3        3    36   66.2 0.683 0.381 16.3  16.6 

# ------------------------ #
#       Example 3          #
# ------------------------ #
# Some analysis times after time at which targeted events accrue
# Check that both Time >= input analysisTime and Events >= input events
gs_info_ahr(events = c(30, 40, 50), analysisTimes = c(16, 19, 26))
#> # A tibble: 3 × 7
#>   Analysis  Time Events   AHR theta  info info0
#>      <int> <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1        1  16     33.1 0.776 0.254  8.12  8.27
#> 2        2  19.2   40.0 0.744 0.295  9.79 10.0 
#> 3        3  26     52.4 0.707 0.346 12.8  13.1 
gs_info_ahr(events = c(30, 40, 50), analysisTimes = c(14, 20, 24))
#> # A tibble: 3 × 7
#>   Analysis  Time Events   AHR theta  info info0
#>      <int> <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1        1  14.9   30.0 0.787 0.240  7.37  7.50
#> 2        2  20     41.7 0.738 0.304 10.2  10.4 
#> 3        3  24.5   50.0 0.713 0.339 12.2  12.5