Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## 0.3.0 (unreleased): LP-DiD, negative horizons, lead paths
## 0.2.1 (2026-11-18): LP-DiD, negative horizons, lead paths

### LP-DiD (Dube, Girardi, Jordà & Taylor 2025)
- `estimator = LPDiD(…)` with the formula `ldiff(y) ~ firstdiff(D) + fe(time)`: the long
Expand Down
2 changes: 1 addition & 1 deletion CITATION.bib
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ @software{PanelLocalProjections_jl
title = {{PanelLocalProjections.jl}: Panel local projections in {Julia}},
url = {https://github.com/andrerecio/PanelLocalProjections.jl},
year = {2026},
version = {0.3.0}
version = {0.2.1}
}

@article{MeiShengShi2026,
Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PanelLocalProjections.jl estimates panel local projections: for each horizon h i
- **Dube–Girardi–Jordà–Taylor (2025, *JAE*):** **LP-DiD**, difference-in-differences by local projections on clean-control samples. Their Stata command is `lpdid` (GPL-3).
- **Almuzara–Sancibrián (2026):** **t-LAHR** inference. It is time-clustered, lag-augmented and heteroskedasticity-robust, with an HC2 + Imbens–Kolesár df refinement. `starting_idea.md` calls it a "HAR estimator", but it is **not** HAR: Driscoll–Kraay, EWC and unit/two-way clustering are its *comparators*.

The phased roadmap, with exit criteria per phase, is in `TODO.md`. Panel LP-IV is v0.2.0 (Phase 6: 6a IV core 19bf450, 6b lag-augmented IV 91564d3, 6c first-stage diagnostics, a public-data example and the release; design in `docs/notes/design/lpiv_design.md`). LP-DiD, negative horizons, lead paths, weights and pooled fits are v0.3.0 (Phase 7).
The phased roadmap, with exit criteria per phase, is in `TODO.md`. Panel LP-IV is v0.2.0 (Phase 6: 6a IV core 19bf450, 6b lag-augmented IV 91564d3, 6c first-stage diagnostics, a public-data example and the release; design in `docs/notes/design/lpiv_design.md`). LP-DiD, negative horizons, lead paths, weights and pooled fits are v0.2.1 (Phase 7).

## Hard rules

Expand Down Expand Up @@ -69,7 +69,7 @@ Rscript crosscheck/R/<file>.R
- **Kaimon.** When the `mcp__kaimon__*` tools are available, use the live REPL (session for this repo via `start_session(project_path = …)`, then `ex`) instead of spawning `julia` for exploration. Revise picks up `src/` edits automatically, but a struct change in `src/types.jl` needs `manage_repl(command = "restart")`. Load test-only packages and the fixtures with `pushfirst!(LOAD_PATH, joinpath(pkgdir(PanelLocalProjections), "dev"))` and `include("test/support/PLPDGPs.jl")` (`read_csv`). `run_tests` runs the whole suite, because TestItemRunner ignores its pattern argument.
- **Scale benchmark:** `julia --project=. -e 'push!(LOAD_PATH, "dev"); include("dev/benchmark_scale.jl")'` (about 70 s; `PLP_BENCH=fe`, `tlahr` or `capped` runs one part, for its own max RSS). Reference for 1.1M rows and 21 horizons: fixed effects 13.9 s, 14 sweeps per horizon, 1.3 GB max RSS; `LagAugmented(ICLags())` 19.6 s and `TLAHR()` 0.8 s, 1.8 GB; `LagAugmented(CappedLags())` 24.5 s, 2.2 GB (Phase 5).

## Architecture (v0.1: Phases 1–5; v0.2: Phase 6, panel LP-IV; v0.3: Phase 7, LP-DiD; see `TODO.md`)
## Architecture (v0.1: Phases 1–5; v0.2: Phase 6, panel LP-IV; v0.2.1: Phase 7, LP-DiD; see `TODO.md`)

One module and no submodules. Every struct lives in `src/types.jl`. Include order: `utils` → `types` → `panelindex` → `formula` → `design` → `absorb` → `ols` → `scores` → `lagselect` → `estimators` → `panellp` → `vcov` → `summary` → `lpdid` → `plotting`; Makie lives in `ext/`.

Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PanelLocalProjections"
uuid = "4bc008c6-1160-4c54-8f8b-e57ec2b93f89"
authors = ["Andrea Recine <andrearec123@gmail.com>"]
version = "0.3.0"
version = "0.2.1"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ procedures of the recent panel-LP literature in one place:
| LP-DiD: difference-in-differences by local projections on clean-control samples, for absorbing, non-absorbing and one-off treatments, with reweighting, regression adjustment, pre-mean differencing, pooled estimates and a pre-trend test | Dube, Girardi, Jordà & Taylor (2025, *JAE*) |
| Pre-trends (negative horizons) and the response holding the later path of the treatment fixed, for a continuous, instrumented treatment | Ilzetzki (2024, *AER*) |

Version 0.3.0, for Julia 1.10 (LTS) and later. What comes after it (joint bands across
Version 0.2.1, for Julia 1.10 (LTS) and later. What comes after it (joint bands across
horizons, weak-IV-robust inference) is listed in [`TODO.md`](TODO.md);
the changes of each version are in [`CHANGELOG.md`](CHANGELOG.md). The
[documentation](#documentation) covers the methods, the conventions of each reference
Expand All @@ -30,7 +30,7 @@ The package is not in the General registry. Install it from GitHub:
```julia
using Pkg
Pkg.add(url = "https://github.com/andrerecio/PanelLocalProjections.jl") # main
Pkg.add(url = "https://github.com/andrerecio/PanelLocalProjections.jl", rev = "v0.2.0") # or a tagged release
Pkg.add(url = "https://github.com/andrerecio/PanelLocalProjections.jl", rev = "v0.2.1") # or a tagged release
```

It depends on StatsModels, Tables, StatsAPI, StatsFuns, RecipesBase and Julia's standard
Expand Down
4 changes: 2 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ structural residual. Every existing variance then applies unchanged, and `TLAHR(
Non-IV and IV fits are bit-identical to 6b.
- [x] Phase 6c gate; commit

## Phase 7: LP-DiD, negative horizons, lead paths (v0.3)
## Phase 7: LP-DiD, negative horizons, lead paths (v0.2.1)

References: Dube, Girardi, Jordà & Taylor (2025, *JAE*) and the Stata command `lpdid` 1.1.0
(GPL-3: run as a black box, never ported); the replication package of Ilzetzki (2024, AER;
Expand Down Expand Up @@ -272,7 +272,7 @@ BSD-3 code, CC BY 4.0 data, local only).
- [x] Phase 7 gate (2026-11-18): `Pkg.test()` on Julia 1.13.3 and 1.10.13 (45,623 tests, the
local MSS and Ilzetzki items included), format, fixtures, docs build, the p7 Stata
fixtures regenerated byte-identically, ado manifest
- [ ] Commit (awaits the user's go-ahead)
- [x] Commit (93f0229; merged to `main` by PR #2, 3d31caf); released as v0.2.1

## After v0.1
- [ ] Adversarial review of the Phase 4 review fixes and of the Phase 5 memory changes (deferred; started twice, stopped for time). Scope:
Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Panel local projections (Jordà 2005): for each horizon ``h``, a panel regressio
([replication](replication/ilzetzki2024.md)).

!!! note "Status"
Version 0.3.0. The roadmap is in `TODO.md` at the repository root.
Version 0.2.1. The roadmap is in `TODO.md` at the repository root.

Fixed-effect absorption, the OLS solver and all variance estimators are implemented in the
package. Their design takes inspiration from
Expand Down
2 changes: 1 addition & 1 deletion docs/src/replication/ilzetzki2024.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Ilzetzki (2024, *American Economic Review*) estimates the response of aircraft p
productivity to demand in World War II by panel LP-IV: 143 production lines, monthly,
1940–1945, with the output of a line instrumented by the output of the other lines of its
broad aircraft type. Two features of his regressions are general options of `panellp`
since v0.3 ([Lead paths and negative horizons](../methods/leads.md)):
since v0.2.1 ([Lead paths and negative horizons](../methods/leads.md)):

- **pre-trends**: the loop runs from a negative horizon (``h = -6`` in his Figure A.4,
``-1`` elsewhere), with the outcome ``y_{i,t+h} - y_{i,t-1}`` at every ``h``;
Expand Down
Loading