Skip to content

Add TROP estimator LinkedIn carousel#229

Merged
igerber merged 3 commits intomainfrom
trop-carousel
Mar 22, 2026
Merged

Add TROP estimator LinkedIn carousel#229
igerber merged 3 commits intomainfrom
trop-carousel

Conversation

@igerber
Copy link
Owner

@igerber igerber commented Mar 22, 2026

Summary

  • Add 8-slide LinkedIn carousel PDF promoting the Triply RObust Panel (TROP) Estimator
  • Dark theme with gold/amber accent, following the V27 Efficient DiD carousel format
  • Slides: Hook → Dilemma → Answer → Triple Robustness → When to Use → Code → Data-Driven Tuning → CTA
  • Generator script uses fpdf + matplotlib (same architecture as generate_v27_pdf.py)
  • All external-facing claims anchored via inline docstring citations to REGISTRY.md and paper sections

Methodology references (required if estimator / math changes)

  • Method name(s): N/A - no methodology changes (carousel/marketing asset only)
  • Paper / source link(s): Athey, Imbens, Qu & Viviano (2025), arXiv:2508.21536
  • Any intentional deviations from the source (and why): None

Validation

  • Tests added/updated: No test changes (standalone carousel generator)
  • Backtest / simulation / notebook evidence (if applicable): N/A
  • PDF verified: all 8 slides render correctly at 270x337.5mm (4:5 LinkedIn format)

Security / privacy

  • Confirm no secrets/PII in this PR: Yes

Generated with Claude Code

igerber and others added 2 commits March 22, 2026 08:48
8-slide dark-theme carousel (gold accent) promoting the Triply RObust
Panel (TROP) Estimator. Follows the V27 Efficient DiD carousel format
with fpdf + matplotlib generation.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Fix try/finally for temp file cleanup (P2)
- Add inline citation docstrings anchoring claims to REGISTRY.md and paper
- Improve slide 4: dark panel pillars with gold borders for visual contrast
- Add equation context labels with LaTeX-rendered Greek symbols
- Remove "First Open-Source Implementation" claim from slide 1

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@github-actions
Copy link

Overall Assessment

Looks good.

Affected method: TROP, but only in external-facing carousel copy. This PR adds carousel/generate_trop_carousel.py and carousel/diff-diff-trop-carousel.pdf; it does not change estimator code, weighting, variance/SE, identification checks, or defaults. No P0/P1 findings.

Executive Summary

  • The main TROP claims in slides 1, 3, 4, and 7 are consistent with the cited source material: TROP combines a factor-adjusted outcome model with unit and time weights, nests existing panel estimators as special cases, and chooses the three λ parameters by leave-one-out cross-validation. (arxiv.org)
  • P2: slide 7 presents local versus global as only a speed choice, but the shipped global implementation is a separate adaptation with a simultaneous-adoption restriction; that caveat matters because slide 5 also markets TROP for staggered adoption.
  • P3: slide 2 uses quotation marks around a paraphrase instead of the paper’s exact wording.
  • I did not find material code-quality, performance, maintainability, security, or tech-debt blockers in the generator or committed PDF.

Methodology

Code Quality

Performance

  • No findings. The repeated matplotlib render/save steps are reasonable for a one-shot asset builder.

Maintainability

  • No findings. The file follows the existing carousel/ generator pattern; there is duplication, but it matches current repo conventions rather than introducing a new special case.

Tech Debt

  • No findings. TODO.md does not already track anything relevant here, and nothing in this PR needs new deferral tracking to be mergeable.

Security

Documentation/Tests

  • P3. Impact: carousel/generate_trop_carousel.py:L404-L409 styles a shortened paraphrase as a direct quote. The paper says, “The different panel data estimators are motivated by different assumptions that are difficult to validate or even compare in practice,” while the slide renders "Different assumptions -- difficult to validate or compare in practice". Concrete fix: use the paper’s exact wording or remove the quotation marks and attribute it as a paraphrase. (arxiv.org)

- P2: Clarify global method requires simultaneous adoption on slide 7
- P3: Use paper's exact wording for slide 2 quote (Section 1, para 1)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@igerber
Copy link
Owner Author

igerber commented Mar 22, 2026

/ai-review

@github-actions
Copy link

🔁 AI review rerun (requested by @igerber)

Head SHA: b72fc595603cc6e328423056e1c1a3f8699477cc


Overall Assessment

✅ Looks good

Affected method: TROP, but only in external-facing carousel copy. This PR adds carousel/generate_trop_carousel.py and carousel/diff-diff-trop-carousel.pdf; it does not change estimator logic, weighting, variance/SE, identification checks, or defaults. Re-review status: the prior slide-2 quote issue is resolved; one P2 wording issue remains on slide 7.

Executive Summary

  • No P0/P1 findings. The TROP implementation itself is unchanged.
  • Previous P3 resolved: slide 2 now uses the paper’s exact wording in carousel/generate_trop_carousel.py:L402-L413, and the committed PDF reflects that updated text.
  • P2: slide 7’s global (faster, simultaneous) wording is still not explicit enough about the real restriction: method="global" is for simultaneous treatment adoption only, not staggered adoption.
  • The remaining TROP claims in the carousel align with the registry and implementation: special-case nesting, working model, heterogeneous per-observation effects, LOOCV tuning, and factor diagnostics.
  • The committed PDF is an 8-page asset, and I did not detect active PDF content beyond a standard fit-view open action.

Methodology

Code Quality

Performance

  • No findings. The Matplotlib-to-PNG rendering approach is reasonable for a one-shot asset generator.

Maintainability

Tech Debt

  • No findings. TODO.md:L44 has no relevant tracked limitation for this PR.

Security

Documentation/Tests

@igerber igerber merged commit 04afed0 into main Mar 22, 2026
@igerber igerber deleted the trop-carousel branch March 22, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant