Expand description
Econometrics: OLS, WLS, 2SLS, logistic MLE, GMM, and calibration records.
Allocation class: HotZeroHeap. All scratch uses fixed-capacity stack
arrays. No Vec/String/Box in any kernel.
Assumptions:
- OLS assumes exogeneity (E[ε|X] = 0), iid errors, no perfect multicollinearity. Standard errors are not yet computed (future work).
- WLS assumes known weights proportional to inverse error variance.
- 2SLS assumes instrument relevance (n_instr >= n_reg) and exogeneity. Underidentified models (n_instr < n_reg) are refused.
- Logistic MLE assumes iid Bernoulli outcomes with logit link; uses Newton-Raphson (IRLS).
Structs§
- Calibration
Record - A
repr(C)calibration record linking a fitted model to its data and diagnostics.
Enums§
Constants§
- MAX_
OBSERVATIONS - Maximum observations in a bounded regression.
- MAX_
REGRESSORS - Maximum regressors (including constant) in a bounded regression.
Functions§
- gmm_
moment_ eval - Evaluate GMM moment conditions:
g(theta) = (1/n) sum m_i(theta). - iv_
2sls_ into - Two-Stage Least Squares (2SLS).
- logistic_
mle_ into - Logistic regression via Newton-Raphson (IRLS).
- ols_
into - Ordinary Least Squares via normal equations
X'X b = X'y. - wls_
into - Weighted Least Squares:
(X'WX) b = X'Wy.