AHR | R Documentation |
AHR()
provides a geometric average hazard ratio under
various non-proportional hazards assumptions for either single or multiple strata studies.
The piecewise exponential distribution allows a simple method to specify a distribution
and enrollment pattern where the enrollment, failure and dropout rates changes over time.
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)), totalDuration = 30, ratio = 1, simple = TRUE )
enrollRates |
Piecewise constant enrollment rates by stratum and time period. |
failRates |
Piecewise constant control group failure rates, duration for each piecewise constant period, hazard ratio for experimental vs control, and dropout rates by stratum and time period. |
totalDuration |
Total follow-up from start of enrollment to data cutoff; this can be a single value or a vector of positive numbers. |
ratio |
ratio of experimental to control randomization. |
simple |
logical; if TRUE (default), for each value in input totalDuration overall event count, statistical information and average hazard ratio are given; if FALSE, hazard ratio, expected events and statistical information are produced by stratum and underlying hazard ratio. |
A tibble
with Time
(from totalDuration
), AHR
(average hazard ratio),
Events
(expected number of events), info (information under given scenarios),
and info0 (information under related null hypothesis) for each value of totalDuration
input;
if simple=FALSE
, Stratum
and t
(beginning of each constant HR period) are also returned
and HR
is returned instead of AHR
The contents of this section are shown in PDF user manual only.
# Example: default AHR() # Example: default with multiple analysis times (varying totalDuration) AHR(totalDuration = c(15, 30)) # Stratified population enrollRates <- tibble::tibble(Stratum = c(rep("Low", 2), rep("High", 3)), duration = c(2, 10, 4, 4, 8), rate = c(5, 10, 0, 3, 6)) failRates <- tibble::tibble(Stratum = c(rep("Low", 2), rep("High", 2)), duration = 1, failRate = c(.1, .2, .3, .4), hr = c(.9, .75, .8, .6), dropoutRate = .001) AHR(enrollRates = enrollRates, failRates = failRates, totalDuration = c(15, 30)) # Same example, give results by strata and time period AHR(enrollRates = enrollRates, failRates = failRates, totalDuration = c(15, 30), simple = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.