D56: limb MALE (CLTI, major amputation, open bypass) as primary outcome; MALE incl. repeat revascularization to supplement
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -67,16 +67,16 @@ perf[, `:=`(mcse_cover = sqrt(cover_own * (1 - cover_own) / reps),
|
||||
fwrite(perf, file.path(outdir, "perf.csv"))
|
||||
|
||||
# ---- negative controls as bias detectors (plan 10) ------------------------------------
|
||||
# One unit = world x scenario x design x variant x replicate. Bias is in the MALE RD
|
||||
# One unit = world x scenario x design x variant x replicate. Bias is in the limb-MALE RD (D56)
|
||||
# against the method's own estimand; a control "flags" when its 95% CI excludes 0.
|
||||
m <- d[analysis == "main" & design != "landmark_m5" & variant %in% c("V1_ignore", "V2_cluster", "V3_random", "V4_within") &
|
||||
contrast %in% c("early_none", "A_B1", "now_not")]
|
||||
u <- c("world", "scenario", "design", "variant", "rep")
|
||||
flag <- function(x) x$lo > 0 | x$hi < 0
|
||||
nc <- m[outcome == "male", c(..u, "est", "own")][, err := est - own]
|
||||
nc <- m[outcome == "limb", c(..u, "est", "own")][, err := est - own]
|
||||
nc <- merge(nc, m[outcome == "nco1", c(..u)][, nco1 := flag(m[outcome == "nco1"])], by = u, all.x = TRUE)
|
||||
nc <- merge(nc, m[outcome == "nco2", c(..u)][, nco2 := flag(m[outcome == "nco2"])], by = u, all.x = TRUE)
|
||||
ne <- d[analysis == "nce" & outcome == "male" & contrast %in% c("early_none", "A_B1")]
|
||||
ne <- d[analysis == "nce" & outcome == "limb" & contrast %in% c("early_none", "A_B1")]
|
||||
nc <- merge(nc, ne[, c(..u)][, nce := flag(ne)], by = u, all.x = TRUE)
|
||||
nc[, any_nc := nco1 | nco2 | fifelse(is.na(nce), FALSE, nce)]
|
||||
nc[, cell_bias := mean(err), by = .(world, scenario, design, variant)]
|
||||
|
||||
Reference in New Issue
Block a user