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

Commit 462918f

Browse files
committed
resolve conflicts
Merge branch 'main' of https://github.com/Merck/gsdmvn into wlr-ahr-evaluation # Conflicts: # tests/testthat/test-independent_test_gs_info_wlr.R
2 parents 3e49f3d + 688f21a commit 462918f

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

tests/testthat/test-independent_test_gs_info_wlr.R

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,24 @@ test_that("Validate the function based on examples with individual functions",{
6161

6262
evt01 <- gsdmvn:::prob_event.arm(arm0, tmax = analysisTimes) * n0 +
6363
gsdmvn:::prob_event.arm(arm1, tmax = analysisTimes) * n1
64-
log_ahr <- sapply(analysisTimes, function(t_k) {
65-
gsdmvn:::gs_delta_wlr(arm0, arm1, tmax = t_k, weight = weight) /
66-
gsdmvn:::gs_delta_wlr(
67-
arm0, arm1,
68-
tmax = t_k,
69-
weight = weight,
70-
approx = "generalized schoenfeld",
71-
normalization = TRUE
72-
)
73-
})
64+
# log_ahr <- sapply(analysisTimes, function(t_k) {
65+
# gsdmvn:::gs_delta_wlr(arm0, arm1, tmax = t_k, weight = weight) /
66+
# gsdmvn:::gs_delta_wlr(
67+
# arm0, arm1,
68+
# tmax = t_k,
69+
# weight = weight,
70+
# approx = "generalized schoenfeld",
71+
# normalization = TRUE
72+
# )
73+
# })
74+
75+
avehr <- gsDesign2::AHR(enrollRates = enrollRates, failRates = failRates, ratio = ratio,
76+
totalDuration = analysisTimes)
7477

7578
#FH(0,1)
7679
expect_equal(object = as.numeric(fh01$N), expected = rep(N01,3), tolerance = 1)
7780
expect_equal(object = as.numeric(fh01$Events), expected = evt01, tolerance = 1)
78-
# expect_equal(object = as.numeric(fh01$AHR), expected = exp(log_ahr), tolerance = .025)
81+
#expect_equal(object = as.numeric(fh01$AHR), expected = exp(log_ahr), tolerance = .025)
7982
expect_equal(object = as.numeric(fh01$delta), expected = -delta01, tolerance = .01)
8083
expect_equal(object = as.numeric(fh01$sigma2), expected = sigma201, tolerance = .01)
8184
expect_equal(object = as.numeric(fh01$theta), expected = theta01, tolerance = .2)

0 commit comments

Comments
 (0)