summary function to fixed_design class
Usage
# S3 method for fixed_design
summary(x, ...)
Arguments
- x
a fixed design object returned by
fixed_design()
- ...
additional arguments
Examples
library(dplyr)
# Enrollment rate
enrollRates <- tibble::tibble(
Stratum = "All",
duration = 18,
rate = 20)
# Failure rates
failRates <- tibble::tibble(
Stratum = "All",
duration = c(4, 100),
failRate = log(2) / 12,
hr = c(1, .6),
dropoutRate = .001)
# Study duration in months
studyDuration <- 36
# Experimental / Control randomization ratio
ratio <- 1
# 1-sided Type I error
alpha <- 0.025
# Type II error (1 - power)
beta <- 0.1
# ------------------------- #
# AHR #
# ------------------------- #
# under fixed power
fixed_design(
x = "AHR",
alpha = alpha,
power = 1 - beta,
enrollRates = enrollRates,
failRates = failRates,
studyDuration = studyDuration,
ratio = ratio
) %>% summary()
#> # A tibble: 1 × 7
#> Design N Events Time Bound alpha Power
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 Average hazard ratio 463. 325. 36 1.96 0.025 0.9
# ------------------------- #
# FH #
# ------------------------- #
# under fixed power
fixed_design(
x = "FH",
alpha = alpha,
power = 1 - beta,
enrollRates = enrollRates,
failRates = failRates,
studyDuration = studyDuration,
ratio = ratio
) %>% summary()
#> # A tibble: 1 × 7
#> Design N Events Time Bound alpha Power
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 Fleming-Harrington FH(0, 0.5) 356. 249. 36 1.96 0.025 0.9