Skip to content

Commit f70c17f

Browse files
igerberclaude
andcommitted
Address PR #371 AI review R2: scenario 15 metadata accuracy
P3 fix: scenario 15's `params.n_groups` was 80 (the switcher cohort allocator input fed into `gen_reversible(n_groups=N_GOLDEN, ...)`) while the realized panel actually contains 120 groups (80 switchers + 20 never-treated + 20 always-treated, appended by `gen_reversible`'s default cohort additions at line 64). Replace with two explicit fields: - `n_switcher_groups = 80`: the load-bearing DGP allocator input - `n_realized_groups = 120`: the actual unique-group count in the serialized data The parity test reads the `data` block directly, not `params`, so it is unaffected by this metadata change. Resolves the misleading-metadata finding the reviewer flagged on R2. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e405aaf commit f70c17f

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

benchmarks/R/generate_dcdh_dynr_test_values.R

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,17 @@ res15 <- did_multiplegt_dyn(
683683
)
684684
scenarios$multi_path_reversible_by_path_placebo <- list(
685685
data = export_data(d15),
686-
params = list(pattern = "multi_path_reversible", n_groups = N_GOLDEN,
686+
# n_switcher_groups records the switcher cohort count fed into
687+
# gen_reversible's `counts_per_F_g` allocator (80 = sum c(20, 20, 15,
688+
# 10, 10, 5)); the realized panel has 120 unique groups after the
689+
# default 20 never-treated + 20 always-treated control rows are
690+
# appended (gen_reversible defaults at line 64). Recording both fields
691+
# avoids the metadata-vs-data mismatch the reviewer flagged on
692+
# PR #371 R2: anyone reusing this scenario's metadata sees both the
693+
# switcher count (the load-bearing number for the DGP allocation) and
694+
# the realized panel size.
695+
params = list(pattern = "multi_path_reversible",
696+
n_switcher_groups = N_GOLDEN, n_realized_groups = N_GOLDEN + 40L,
687697
n_periods = 10, seed = 115, effects = 3, placebo = 2,
688698
by_path = 3, ci_level = 95),
689699
results = extract_dcdh_by_path(res15, n_effects = 3, n_placebos = 2)

benchmarks/data/dcdh_dynr_golden_values.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,8 @@
766766
},
767767
"params": {
768768
"pattern": "multi_path_reversible",
769-
"n_groups": 80,
769+
"n_switcher_groups": 80,
770+
"n_realized_groups": 120,
770771
"n_periods": 10,
771772
"seed": 115,
772773
"effects": 3,

0 commit comments

Comments
 (0)