summary.fixed_design: Summary for fixed design objects

View source: R/summary.R

summary.fixed_designR Documentation

Summary for fixed design objects

Description

Summary for fixed_design() objects

Usage

## S3 method for class 'fixed_design'
summary(object, ...)

Arguments

object

A fixed design object returned by fixed_design()

...

Additional arguments

Value

A data frame

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()

# ------------------------- #
#        FH                 #
# ------------------------- #
# under fixed power
fixed_design(
  x = "FH",
  alpha = alpha,
  power = 1 - beta,
  enrollRates = enrollRates,
  failRates = failRates,
  studyDuration = studyDuration,
   ratio = ratio
  ) %>% summary()


keaven/gsDesign2 documentation built on Oct. 13, 2022, 8:42 p.m.