Skip to content

Commit

Permalink
use previous columns
Browse files Browse the repository at this point in the history
  • Loading branch information
gravesti committed Jun 21, 2024
1 parent 4f71ab9 commit f0feb93
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/testthat/test-maic_unanchored.R
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,21 @@ test_that("test time to event case", {
use_adsl <- center_ipd(ipd = adsl, agd = target_pop)

#### derive weights
cols <- c(
"AGE_CENTERED", "AGE_MEDIAN_CENTERED", "AGE_SQUARED_CENTERED",
"SEX_MALE_CENTERED", "ECOG0_CENTERED", "SMOKE_CENTERED"
)
# cols <- grep("_CENTERED$", names(use_adsl))
match_res <- estimate_weights(
data = use_adsl,
centered_colnames = grep("_CENTERED$", names(use_adsl)),
centered_colnames = cols,
start_val = 0,
method = "BFGS"
)

match_res_boot <- estimate_weights(
data = use_adsl,
centered_colnames = grep("_CENTERED$", names(use_adsl)),
centered_colnames = cols,
start_val = 0,
method = "BFGS",
n_boot_iteration = 500,
Expand Down

0 comments on commit f0feb93

Please sign in to comment.