Skip to content

Commit 6503c65

Browse files
committed
docs(estimation): document the estimation-state contracts
Records in the architecture guide which post-estimation paths reject non-OLS results, that CRV3 and slow randomization refits replay the estimation contract, and how the storage options now reach multiple-estimation containers. Files the container storage note under bug fixes next to the related first-stage note instead of under the removals list.
1 parent 5f47aae commit 6503c65

2 files changed

Lines changed: 34 additions & 20 deletions

File tree

docs/changelog.qmd

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,6 @@ We also removed:
219219

220220
- Removed `pf.dtable()`; use `maketables.DTable()` directly instead.
221221

222-
Storage options:
223-
224-
- `store_data=False` and `lean=True` now apply to multiple-estimation
225-
containers; `FixestMulti.vcov()` accepts a common explicit estimation sample;
226-
default multi-quantile results retain the arrays needed for prediction and
227-
covariance updates.
228-
229222
### Bug Fixes
230223

231224
- `lean=True` results keep the formula specification and evaluation context, so
@@ -236,6 +229,10 @@ Storage options:
236229
- `store_data=False` and `lean=True` now apply to retained IV first stages; lean
237230
fits also discard demeaning caches, GLM working state, and quantile solver
238231
outputs.
232+
- `store_data=False` and `lean=True` now apply to multiple-estimation
233+
containers; `FixestMulti.vcov()` accepts a common explicit estimation sample;
234+
default multi-quantile results retain the arrays needed for prediction and
235+
covariance updates.
239236
- Fitted models and non-plotting DiD and reporting paths no longer import
240237
plotting dependencies eagerly. `ritest()` loads its numerical helpers on use,
241238
while Matplotlib, Seaborn, and Lets-Plot load only when plotting.

docs/developer/architecture.md

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -263,19 +263,36 @@ fixed effects, but rejects `inplace=True`: design rows alone cannot reconstruct
263263
the complete formula, prediction, inference, and performance state of a fitted
264264
result.
265265

266-
Storage policy follows the full result graph. Retained IV first stages honor
267-
`store_data=False`, and lean results discard within state, GLM working state,
268-
demeaning caches, quantile solver outputs, and large first-stage arrays. Lean
269-
results do keep the formula specification and evaluation context, so
270-
`predict(newdata=...)` still works for models without fixed effects. Array-only
271-
covariance updates remain available after `store_data=False`; cluster and HAC
272-
updates require the estimation sample through the documented `vcov(data=...)`
273-
argument. Explicit covariance data must already be filtered to the fitted row
274-
sample and retain its estimation order; a row-count check rejects misaligned
275-
inputs before covariance dispatch. Lean results reject post-fit covariance
276-
updates because their numerical arrays have been discarded. Every other method
277-
that needs discarded state raises an informative error naming the storage
278-
option and its remedy.
266+
Post-estimation paths reject the estimators they cannot represent instead of
267+
reading their arrays as OLS state. Non-Poisson GLMs reject `CRV3` until their
268+
leave-cluster-out refits can retain the original family and solver
269+
configuration; Poisson keeps its longstanding jackknife-refit path.
270+
Randomization inference rejects non-OLS/non-Poisson results, and the wild
271+
bootstrap and `decompose()` reject non-OLS results, so none of them
272+
reinterprets GLM working state or quantile solver outputs as linear-model
273+
arrays. Poisson CRV3 and slow randomization refits replay the original
274+
estimation options. A prebuilt LSMR preconditioner is the sole exception: its
275+
factorization belongs to one fixed-effect design, so refits keep its variant
276+
but rebuild it for the changed row set. Weighted `fixef()` stores `_sumFE` in
277+
response units, and `IV_Diag()` leaves the outer model's covariance label
278+
untouched.
279+
280+
Storage policy follows the full result graph. Multiple-estimation containers
281+
keep no copy of the input frame under `store_data=False` or `lean=True`,
282+
retained IV first stages honor `store_data=False`, and lean results discard
283+
within state, GLM working state, demeaning caches, quantile solver outputs, and
284+
large first-stage arrays. Lean results do keep the formula specification and
285+
evaluation context, so `predict(newdata=...)` still works for models without
286+
fixed effects. Array-only covariance updates remain available after
287+
`store_data=False`; cluster and HAC updates require the estimation sample
288+
through the documented `vcov(data=...)` argument. Explicit covariance data must
289+
already be filtered to the fitted row sample and retain its estimation order; a
290+
row-count check rejects misaligned inputs before covariance dispatch, and
291+
`FixestMulti.vcov(data=...)` validates one common sample for every child before
292+
any child is updated. Lean results reject post-fit covariance updates because
293+
their numerical arrays have been discarded. Every other method that needs
294+
discarded state raises an informative error naming the storage option and its
295+
remedy.
279296

280297
Keeping canonical arrays unpremultiplied favors readability without moving
281298
weight work out of the numerical hot path: each solver still performs the same

0 commit comments

Comments
 (0)