Skip to content
This repository has been archived by the owner on Jun 14, 2023. It is now read-only.

Magirr-Burman with large tau #14

Open
elong0527 opened this issue Mar 17, 2022 · 0 comments
Open

Magirr-Burman with large tau #14

elong0527 opened this issue Mar 17, 2022 · 0 comments
Assignees

Comments

@elong0527
Copy link
Collaborator

we find the gs_power_wlr() might have a numerical bug when applying Magirr-Burman with large tau (e.g. rho = -1, gamma = 0, tau = 20)

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")
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants