QuantEcon · GitHub

Commit 68e893d

jstacclaude

and

authored

[unemployment_shocks] Rigorous LOO derivation + jax-only computation (#941)

* [unemployment_shocks] Rigorous LOO derivation + jax-only computation Rewrite the "Computational methods" section as a formal assumption/proposition/proof: state the conditional-independence assumption (noting it is false for the time series and revisited below), prove the exact Gelfand identity for the LOO predictive density, and obtain the harmonic-mean estimator as a Monte Carlo average that becomes exact a.s. as S -> infinity. Use explicit integral notation throughout and follow the blank-line-per-sentence convention. Keep the pointwise LOO computation entirely in jax (jax.scipy.special.logsumexp, jnp.log, jnp.sqrt) instead of bouncing between jax and numpy. Verified end-to-end on GPU: r_hat=1.00, 0 divergences, elpd diff 11.8 vs SE 5.7, p_loo 3.6/6.5, all Pareto k < 0.7. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * [unemployment_shocks] Slim down cross-validation section Trim the LOO exposition: drop the infinite-variance/importance-weights caveat and the Pareto-k/PSIS and AIC/BIC discussion (kept consistent, no dangling references). Remove the posterior-predictive asymmetry section, and adjust the plan and conclusion so the lecture no longer promises a check it no longer performs. Fix a few typos. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

1 file changed

Lines changed: 174 additions & 215 deletions

Read the original on github.com ↗