You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement Algorithm 3 from Arkhangelsky et al. (2021) as a third
variance_method option ("jackknife") matching R's synthdid::vcov(method="jackknife").
Delete-1 jackknife over all units with fixed weights - no Frank-Wolfe
re-estimation, making it the fastest variance method. Validated against
R golden values with SE matching to machine precision (5.5e-15).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implements Algorithm 3 from Arkhangelsky et al. (2021):
1477
+
1. For each control unit j=1,...,N_co:
1478
+
- Remove unit j, renormalize omega: `ω_jk = _sum_normalize(ω[remaining])`
1479
+
- Keep λ unchanged, keep treated means unchanged
1480
+
- Compute SDID estimate τ_{(-j)}
1481
+
2. For each treated unit k=1,...,N_tr:
1482
+
- Keep ω and λ unchanged
1483
+
- Recompute treated mean from remaining N_tr-1 treated units
1484
+
- Compute SDID estimate τ_{(-k)}
1485
+
3.`SE = sqrt( ((n-1)/n) × Σ (τ_{(-i)} - τ̄)² )` where n = N_co + N_tr
1486
+
1487
+
Fixed weights: No Frank-Wolfe re-estimation (`update.omega=FALSE, update.lambda=FALSE`).
1488
+
Returns NaN SE for single treated unit or single nonzero-weight control.
1489
+
Deterministic: exactly N_co + N_tr iterations, no replications parameter.
1490
+
P-value: analytical (normal distribution), not empirical.
1491
+
1475
1492
*Edge cases:*
1476
1493
-**Frank-Wolfe non-convergence**: Returns current weights after max_iter iterations. No warning emitted; the convergence check `vals[t-1] - vals[t] < min_decrease²` simply does not trigger early exit, and the final iterate is returned.
@@ -1490,7 +1507,10 @@ Convergence criterion: stop when objective decrease < min_decrease² (default mi
1490
1507
-**Varying treatment within unit**: Raises `ValueError`. SDID requires block treatment (constant within each unit). Suggests CallawaySantAnna or ImputationDiD for staggered adoption.
1491
1508
-**Unbalanced panel**: Raises `ValueError`. SDID requires all units observed in all periods. Suggests `balance_panel()`.
-**Note:** Survey support: weights, strata, PSU, and FPC are all supported. Full-design surveys use Rao-Wu rescaled bootstrap (Phase 6); `variance_method="placebo"` requires weights-only (strata/PSU/FPC require bootstrap). Both sides weighted per WLS regression interpretation: treated-side means are survey-weighted (Frank-Wolfe target and ATT formula); control-side synthetic weights are composed with survey weights post-optimization (ω_eff = ω * w_co, renormalized). Frank-Wolfe optimization itself is unweighted — survey importance enters after trajectory-matching. Covariate residualization uses WLS with survey weights. Placebo and bootstrap SE preserve survey weights on both sides.
1510
+
-**Jackknife with single treated unit**: Returns NaN SE. Cannot leave-one-out with N_tr=1; R returns NA for the same condition.
1511
+
-**Jackknife with single nonzero-weight control**: Returns NaN SE. Leaving out the only effective control is not meaningful.
1512
+
-**Jackknife with non-finite LOO estimate**: Returns NaN SE. Unlike bootstrap/placebo, jackknife is deterministic and cannot skip failed iterations; NaN propagates through `var()` (matches R behavior).
1513
+
-**Note:** Survey support: weights, strata, PSU, and FPC are all supported. Full-design surveys use Rao-Wu rescaled bootstrap (Phase 6); non-bootstrap variance methods (`variance_method="placebo"` or `"jackknife"`) require weights-only (strata/PSU/FPC require bootstrap). Both sides weighted per WLS regression interpretation: treated-side means are survey-weighted (Frank-Wolfe target and ATT formula); control-side synthetic weights are composed with survey weights post-optimization (ω_eff = ω * w_co, renormalized). Frank-Wolfe optimization itself is unweighted — survey importance enters after trajectory-matching. Covariate residualization uses WLS with survey weights. Placebo, jackknife, and bootstrap SE preserve survey weights on both sides.
1494
1514
1495
1515
**Reference implementation(s):**
1496
1516
- R: `synthdid::synthdid_estimate()` (Arkhangelsky et al.'s official package)
@@ -1505,6 +1525,9 @@ Convergence criterion: stop when objective decrease < min_decrease² (default mi
1505
1525
-[x] Placebo SE formula: sqrt((r-1)/r) * sd(placebo_estimates)
1506
1526
-[x] Placebo SE: re-estimates omega and lambda per replication (matching R's update.omega=TRUE, update.lambda=TRUE)
0 commit comments