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

`gs_info_wlr` #43

Closed LittleBeannie closed 2 years ago

LittleBeannie commented 2 years ago

Hi @elong0527 , could you please explain more details on line 87 in https://github.com/Merck/gsdmvn/blob/main/R/gs_info_wlr.R#L87? This seq(0,tmax,length.out = 10) will gives a warning message when you run

enrollRates<-tibble::tibble(Stratum="All",duration=6,rate=1)
failRates<-tibble::tibble(Stratum="All",period=1
                          ,duration=1
                          ,failRate=0.02
                          ,hr=0.6
                          ,dropoutRate=0.01)
gs_design_wlr(enrollRates = enrollRates,
                                  failRates = failRates,
                                  analysisTimes = 18,
                                  ratio=2,
                                  alpha=0.025,
                                  beta=0.2,
                                  upar = qnorm(.975),
                                  lpar = qnorm(.975),
                                  approx = "event driven")
Warning messages:
1: In if (wlr_weight_fh(seq(0, tmax, length.out = 10), arm0, arm1) !=  :
  the condition has length > 1 and only the first element will be used
2: In if (wlr_weight_fh(seq(0, tmax, length.out = 10), arm0, arm1) !=  :
  the condition has length > 1 and only the first element will be used