Merck / gsdmvn

The goal of gsdmvn is to enable group sequential trial design for time-to-event endpoints under non-proportional hazards assumptions.
http://merck.github.io/gsdmvn/
GNU General Public License v3.0
3 stars 5 forks source link

bug fix: large tau #13

Closed elong0527 closed 2 years ago

elong0527 commented 2 years ago

The issue in the example below is fixed.

library(gsdmvn)
library(tibble)
# enrollment rate
enrollRates <- tibble(Stratum = "All", duration = 12, rate = 42)
# failure rate
failRates <- tibble(Stratum = "All",
                    duration = c(6, 100),
                    failRate = log(2) / 15,
                    hr = c(1, .6),
                    dropoutRate = 0.001)
# randomization ratio (exp : ctl)
ratio <- 1
# study duration (enrollment + min follow up)
trial_duration <- 28
# weight in WLR
weight <- function(x, arm0, arm1){gsdmvn:::wlr_weight_fh(x, arm0, arm1, rho = -1, gamma = 0, tau = 20)}
# create Arm object
gs_arm <- gs_create_arm(enrollRates, failRates, ratio)
arm0 <- gs_arm$arm0
arm1 <- gs_arm$arm1
# calculate delta
gs_delta_wlr(arm0, arm1, tmax = trial_duration, weight = weight, approx = "asymptotic")
codecov-commenter commented 2 years ago

Codecov Report

Merging #13 (7ad5113) into main (1bfab87) will not change coverage. The diff coverage is 100.00%.

:exclamation: Current head 7ad5113 differs from pull request most recent head e2c6243. Consider uploading reports for the commit e2c6243 to get more accurate results

@@           Coverage Diff           @@
##             main      #13   +/-   ##
=======================================
  Coverage   82.40%   82.40%           
=======================================
  Files          27       27           
  Lines         972      972           
=======================================
  Hits          801      801           
  Misses        171      171           
Impacted Files Coverage Δ
R/gs_info_wlr.R 82.35% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1bfab87...e2c6243. Read the comment docs.