Add HC1/HC2/HC3 estimators, improve tests and docs - #27
Merged
eloualiche merged 1 commit intoMar 30, 2026
Conversation
- Add `Vcov.hc(n)` constructor for HC1, HC2, HC3 variants; `robust()` remains HC1 - HC2/HC3 use leverage-adjusted residuals (OLS only) - Switch from manual Base.precompile hints to PrecompileTools @compile_workload - Add vcov computation tests verified against manual formulas (Simple, Robust, HC2, HC3, Cluster) - Add ranktest smoke tests and edge case tests - Fix README: replace nonexistent dof_tstat with dof_residual, document all estimators - Minor cleanup: || in ranktest, remove unused import, simplify S_hat broadcasting Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #27 +/- ##
===========================================
+ Coverage 28.57% 92.26% +63.69%
===========================================
Files 7 7
Lines 140 168 +28
===========================================
+ Hits 40 155 +115
+ Misses 100 13 -87 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Vcov.hc(n)constructor for HC1, HC2, HC3 heteroskedasticity-robust variants;robust()remains HC1 for backward compatibilityBase.precompilehints to PrecompileTools@compile_workloaddof_tstatwithdof_residual, document all estimators||in ranktest, remove unused import, simplifyS_hatbroadcastingTest plan
Pkg.test())🤖 Generated with Claude Code