D57: run-time trims (V3 skipped where physician plays no role, NCE without V3, landmark_m5 under V1 only)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-28 16:54:42 -04:00
co-authored by Claude Opus 5.5
parent 3aa6c1c5b3
commit ae58d0f7ca
3 changed files with 10 additions and 2 deletions
+4
View File
@@ -5,6 +5,10 @@ main:
designs: [naive, landmark, landmark_m5, ccw, seq] # landmark_m5: also adjusts for month-5 severity (supplement, D53)
variants: [V1_ignore, V3_random, V4_within] # V1 also yields V2 (cluster-robust SE)
nce: true # negative-control exposure (landmark, CCW), D32/D36
# trims (D57): supplement-only or uninformative cells are skipped to save time
v1_only_designs: [landmark_m5] # month-5 landmark (supplement) only without physician terms
nce_variants: [V1_ignore, V4_within] # NCE without the random intercept
skip_variant: {V3_random: [W0, W4]} # worlds where the physician plays no role by design
rct: [realistic, ideal]
scales:
smoke: {n_patients: 20000, reps: 1}
+5 -2
View File
@@ -25,8 +25,11 @@ one_job <- function(i) {
rbind(r, copy(r)[, `:=`(variant = "V2_cluster", se = se_cluster)]) else r
nce_out <- c(limb = "t_limb", male = "t_male", disease = "t_disease")
for (v in g$variants) {
out[[length(out) + 1]] <- with_v2(run_designs(rec, unlist(g$designs), v))[, analysis := "main"]
if (isTRUE(g$nce))
if (j$world %in% unlist(g$skip_variant[[v]])) next
des <- unlist(g$designs)
if (v != "V1_ignore") des <- setdiff(des, unlist(g$v1_only_designs))
out[[length(out) + 1]] <- with_v2(run_designs(rec, des, v))[, analysis := "main"]
if (isTRUE(g$nce) && (is.null(g$nce_variants) || v %in% unlist(g$nce_variants)))
out[[length(out) + 1]] <- with_v2(run_designs(nce_records(rec), c("landmark", "ccw"), v, nce_out))[, analysis := "nce"]
}
# unadjusted NCE (supplement, D36), V1/V2 only