OptimalGIV v0.2.2
New Features
🎯 Principal Component Extraction Support (#9)
- Added support for internal principal component extraction from
residuals using HeteroPCA.jl - Use pc(k) in formulas to extract k common factors: @formula(q +
endog(p) ~ controls + pc(2)) - PC extraction changes moment conditions from E[u_i u_{S,-i}] = 0 to
E[u_i u_j] = ΛΛ' - Includes PC factors, loadings, and HeteroPCA model in results
- Configure PC extraction with pca_option parameter
📐 Improved Architecture (#8)
- Refactored ObservationIndex into standalone utils module for better
code organization - Enhanced panel data handling and indexing capabilities
Bug Fixes
- Fixed bugs in joining fixed effects DataFrame (fedf) with main results
- Improved handling of missing values in PC extraction (missing values
remain missing rather than zero) - Fixed consistency issues between different estimation algorithms
Enhancements
- Consolidated and streamlined interface tests for better coverage
- Added comprehensive tests for PC extraction functionality
- Improved simulation framework with PC extraction support
- Enhanced documentation with CLAUDE.md for AI-assisted development
- Better error handling and validation for complex formulas
Breaking Changes
- Variance-covariance matrix calculation is automatically disabled when
using PC extraction
Notes
- Small sample PC extraction may not have exact roots - consider using
minimization instead - Models with fully flexible elasticities and factor loadings are not
theoretically identifiable
Merged pull requests: