=== RESEARCH ===
{'issue': 288, 'kind': 'docs', 'defect_status': 'confirmed', 'category': 'prose-fix', 'target_files': ['docs/src/regression.md', 'docs/src/binary_choice.md', 'docs/src/ordered_multinomial.md', 'docs/src/pvar.md', 'docs/src/panel_reg.md', 'docs/src/did.md'], 'summary': "Fix the cross-section+panel MED sweep: render every interpreted value in last-expression @example blocks (binary_choice, pvar, did), display the vif values regression.md interprets, make panel_reg Recipe 4 DGP actually endogenous, add a closing interpretation to ordered_multinomial's Complete Example, and add the missing companion cross-links (did→event_study; panel_reg→pvar and →binary_choice).", 'current_state': 'All five sub-defects still present at current release/v0.6.6 tip. (1) Last-expression bug — binary_choice.md:372-374 stacks round.(or.or)/round.(or.ci_lower)/round.(or.ci_upper); only ci_upper renders, yet :377 interprets the odds ratio and CI. binary_choice.md:421-424 + 428-429 stack accuracy/sensitivity/specificity/f1 then ct_30 sens/spec; only line 429 renders, :432 interprets. binary_choice.md Complete Example :600-602 and :608-611 stack the same bare round.() lines; only 611 renders. did.md:432-434 stacks nw.has_negative_weights/nw.n_negative/nw.total_negative_weight; only :434 renders, :437 interprets negative weights. pvar.md:453-455 stacks mmsc.bic/mmsc.aic/mmsc.hqic (only hqic renders); pvar.md:467-469 stacks sel.best_bic/best_aic/best_hqic (only best_hqic renders). NOTE the audit\'s pvar anchors :315/:329/:347 are single trailing assignments (irfs=/girfs=/decomp=) that DO render (as raw HxmxM array dumps) — not hidden-value bugs; the genuine multi-value defects are only the mmsc and sel blocks. (2) regression.md computes v=vif(m) at :81 (Recipe 5), :487, and :621 but never displays it; :488 and :488\'s block end on report(m), :622 ends on `nothing # hide`, while :491 interprets \\"VIF values for x1 and x2 are large\\" and :630 interprets \\"VIF values are low\\" — both cite unrendered numbers. (3) panel_reg.md:66-80 Recipe 4 titled \\"simulated endogeneity\\": :75 df_iv.x_endog = 0.5.*z .+ randn(n); :76 df_iv.wage = alpha_i .+ 1.5.*x .+ 2.0.*x_endog .+ randn(n) — the wage error is a FRESH independent randn, uncorrelated with x_endog, so x_endog is exogenous and the FE-IV estimator corrects no bias. (4) ordered_multinomial.md:396-441 Complete Example ends on report(m_mlogit) at :440 followed immediately by `---`/`## Common Pitfalls` at :443/:445 — no closing interpretation of the rendered ologit/oprobit/mlogit output. (5) did.md contains no @ref to event_study.md (only iframe src did_event_study.html assets), while event_study.md:414 already links did via `[Difference-in-Differences](@ref did_page)` — a one-directional pair; panel_reg.md has no @ref to pvar_page or binary_choice_page (only @ref is the arellano_bond_ar_test docstring at :231). Page anchors confirmed: did_page, event_study_page, pvar_page, binary_choice_page all defined on their H1 (did.md:1, event_study.md:1, pvar.md:1, binary_choice.md:1).', 'proposed_change': 'Per docrule §Data & Output Integrity (docs/docrule.md:184-189: use field access with round() for interpreted values; docrule.md:342 for @ref form). (1) Collapse each stacked bare-display block into ONE trailing NamedTuple so every interpreted number renders. binary_choice.md:372-374 -> `(or = round.(or.or, digits=3), ci_lower = round.(or.ci_lower, digits=3), ci_upper = round.(or.ci_upper, digits=3))`. binary_choice.md:421-429 -> replace the two round-stacks with a single closing `(default = (accuracy = round(ct[\\"accuracy\\"],digits=3), sensitivity = round(ct[\\"sensitivity\\"],digits=3), specificity = round(ct[\\"specificity\\"],digits=3), f1 = round(ct[\\"f1_score\\"],digits=3)), thr30 = (sensitivity = round(ct_30[\\"sensitivity\\"],digits=3), specificity = round(ct_30[\\"specificity\\"],digits=3)))` (keep ct_30 defined above it). binary_choice.md Complete Example :600-602 and :608-611 -> same NamedTuple collapse (one NT for odds ratios, one for classification metrics; since the block already ends there, make the classification NT the final expression). did.md:432-434 -> `(has_negative_weights = nw.has_negative_weights, n_negative = nw.n_negative, total_negative_weight = round(nw.total_negative_weight, digits=4))`. pvar.md:453-455 -> `(bic = mmsc.bic, aic = mmsc.aic, hqic = mmsc.hqic)`; pvar.md:467-469 -> `(best_bic = sel.best_bic, best_aic = sel.best_aic, best_hqic = sel.best_hqic)`. Do NOT touch pvar.md:315/329/347 (single assignments already render; their raw-array-dump concern is LOW/out of scope, owned by T193). (2) regression.md: display the vif values at the two interpreted sites — at :487-488 make the block end on `(x1 = round(v[1],digits=2), x2 = round(v[2],digits=2), x3 = round(v[3],digits=2))` (or `round.(v, digits=2)`) after report(m); at :619-622 replace `v = vif(m_ols)` / `nothing # hide` with a trailing displayed `round.(vif(m_ols), digits=2)`; at Recipe 5 :81 either delete the dead `v = vif(m)` line or display it — deleting is cleaner since Recipe 5\'s interpretation is report(m), not VIF. Confirm indexing against src (vif returns a Vector aligned to regressor columns incl. intercept — verify v[1] is intercept before labeling; simplest is `round.(v, digits=2)`). (3) panel_reg.md:75-76: introduce a shared error component to induce endogeneity, e.g. `u = randn(n)` then `df_iv.x_endog = 0.5 .* df_iv.z .+ u .+ randn(n)` and `df_iv.wage = alpha_i .+ 1.5 .* df_iv.x .+ 2.0 .* df_iv.x_endog .+ u .+ randn(n)` so x_endog now correlates with the wage error via u and FE-IV visibly corrects the OLS bias; keep instruments=[:z] (z stays exogenous). Alternatively rewrite the \\"simulated endogeneity\\" title/prose to drop the claim — prefer the DGP fix so the recipe demonstrates what it advertises. (4) ordered_multinomial.md: after :441 (before the `---` at :443) add a closing interpretation paragraph citing the rendered output — income coefficient positive / education negative in m_ologit, the Brant test p-value at :428 not rejecting proportional odds, ologit and oprobit agreeing in sign, and mlogit log-odds coefficients relative to the base category. (5) Cross-links: in did.md add a back-link to the Event Study LP page — natural site is the TWFE Event Study section intro (did.md:212) e.g. \\"For the standalone local-projection event-study estimator see [Event Study LP](@ref event_study_page).\\" In panel_reg.md add two inline @ref links — in the Panel Discrete Choice section (panel_reg.md:342) link \\"[Binary Choice Models](@ref binary_choice_page)\\" for the cross-sectional logit/probit counterpart, and add \\"[Panel VAR](@ref pvar_page)\\" (e.g. in the intro :3 or a see-also line) for the shared panel-dynamics estimator. No make.jl changes: no pages are created/moved/renamed, so no `pages=` or nav edits are required.', 'verify': 'Build each edited page (Julia not confirmed installed here — planning only): `julia --project=docs docs/verify_examples.jl docs/src/binary_choice.md`, and likewise for regression.md, ordered_multinomial.md, pvar.md, panel_reg.md, did.md → each must report OK. Spot-check the rendered HTML that the new NamedTuples show all fields, that regression.md shows VIF numbers, and that the panel_reg Recipe 4 OLS-vs-IV coefficients now diverge (bias visible).', 'dependencies': [], 'collisions': ['docs/src/panel_reg.md — #292 (T193 LOW panel sweep: xtiverg typo :3, uncited refs, iframe/save_plot mismatch)', 'docs/src/pvar.md — #292 (T193 LOW: raw-array-dump interpretation at pvar :315/:329/:347, uncited refs)', 'docs/src/regression.md — #292 (T193 LOW: save_plot vs iframe filename mismatch)', 'docs/src/binary_choice.md — #292 (T193 LOW: probit-on-logistic DGP Recipe 2, iframe mismatch, uncited refs)', 'docs/src/regression.md — #299 (T200 site-wide citation/References unification)', 'docs/src/binary_choice.md — #299 (T200 References/citation restyle)', 'docs/src/panel_reg.md — #299 (T200 References/citation restyle)', 'docs/src/ordered_multinomial.md — #299 (T200 References restyle :459-465)', 'docs/src/did.md — #299 (T200 References restyle)', 'docs/src/pvar.md — #299 (T200 References restyle)', 'make.jl/nav — #295 (T196 Cross-Section & Panel section merge; sequencing only, no body overlap)'], 'effort': 'L', 'risk': 'low'}

=== VERIFY ===
{'issue': 288, 'verdict': 'CORRECTED', 'assessment': 'All five sub-defects are REAL at the current release/v0.6.6 tip, independently confirmed against file contents. (1) binary_choice.md:374/429 are last-expression stacks (only the final round() renders while :377/:432 interpret the hidden ones); did.md:434 renders only total_negative_weight; pvar.md:455/469 render only hqic/best_hqic. (2) regression.md:81 dead vif, :488 block ends on report(m) while :491 interprets VIF, :622 nothing#hide while :630 interprets "VIF values are low" — all confirmed. (3) panel_reg.md:75-76 DGP: x_endog=0.5*z+randn, wage error a FRESH independent randn → x_endog is exogenous, FE-IV corrects nothing; the shared-u fix is mathematically correct (Cov(x_endog,err)=Var(u)>0, z stays a valid instrument). (4) ordered_multinomial.md Complete Example 400-441 has no closing interpretation before ---/Common Pitfalls; each sub-block already renders its own value, so this is purely a missing-prose defect. (5) did.md has ZERO @ref (only iframe srcs), event_study.md:414 links did one-directionally, panel_reg.md\'s only @ref is arellano_bond_ar_test:231; anchors did_page/event_study_page/pvar_page/binary_choice_page all confirmed on H1. Two problems force CORRECTED rather than CONFIRMED: (A) the binary_choice Complete Example is ONE @example block ending on `nothing # hide` at line 612, so currently NONE of 600-602/608-611 render (research\'s "only 611 renders" is wrong, and its proposed two-NamedTuple-in-one-block fix would still leave the odds-ratio NT hidden and, if nothing#hide is kept, render nothing at all); (B) the research\'s vif caveat is factually false — src/reg/diagnostics.jl:22,32-33 returns one value per NON-intercept regressor (intercept removed), so v[1]=x1, not the intercept. Everything else in the proposed change is correct and obeys docrule.md:184-189 (field access + round for interpreted values) and :342 (@ref form on @id H1 anchors).', 'corrections': 'binary_choice Complete Example (block 556-613): the spec\'s "make the classification NT the final expression, since the block already ends there" is WRONG. (a) You MUST delete the `nothing # hide` at line 612, otherwise the final NamedTuple never renders. (b) A single @example block renders only its LAST expression, so two NamedTuples (Step 5 odds ratios + Step 6 classification) cannot both render — the odds-ratio NT interpreted at :620 would stay hidden. Split Step 5 and Step 6 into SEPARATE @example blocks (each ending on its own NamedTuple), mirroring ordered_multinomial\'s per-step Complete-Example structure, so both the odds-ratio and classification metrics render. regression.md VIF: ignore the spec\'s worry that vif "includes the intercept" — src/reg/diagnostics.jl:22,32-33 confirms vif returns one value per NON-intercept regressor with the intercept removed, so for X=hcat(ones,x1,x2,x3) v[1]=x1, v[2]=x2, v[3]=x3. The proposed labeled NamedTuple (x1=round(v[1]..),x2=round(v[2]..),x3=round(v[3]..)) is CORRECT as written; do NOT relabel v[1] as the intercept. round.(v, digits=2) is equally fine. All other edits (did.md:432-434 3-field NT; pvar.md:453-455 and 467-469 NTs — optionally round the float bic/aic/hqic per docrule but not required since no prose cites them; panel_reg shared-u DGP fix keeping instruments=[:z]; ordered_multinomial closing interpretation; did->event_study @ref at :212, panel_reg->binary_choice_page at :342 and ->pvar_page near :3) are correct and complete as specified.', 'collision_issues': [292, 295, 299], 'discriminating_power': 'n/a (docs-only change; no test assertions involved)', 'final_effort': 'L'}