Robust covariance
Verification
Models
- OLS
- Logistic regression
- Probit regression
- Poisson regression
- Linear mixed model
- Linear mixed model, published data
- Binomial mixed model
- R compatibility
- IV
- Ridge
- Robust covariance
On this page
Numerics
Test suites
Scope
Covariance, SEs, coefficient inference, prediction uncertainty, and shared sample accounting.
References
- Reference
- sandwich on lm and ivreg
- Versions
- R 4.6.1 (2026-06-24), sandwich 3.1.3, ivreg 0.6.8
Data
- Inputs
- 107 cases including weighted day clusters and Newey-West lags 6/24 on heating-shaped inputs.
Method
Saved public sandwich output for weighted OLS/IV, checked in the extension and polyfill.
- Check
- Comparison with a reference implementation
Tolerances
|x − r| ≤ 1e-9 + 1e-7 × |r|
Applies to: Numerical results
x: package value; r: reference value. Absolute error: |x − r|. Max errors are over the values a row compares.
Results
214 comparisons in 107 cases: 214 pass, 0 fail, 0 skipped.
By case
| Case | Comparisons | Largest abs. error | Status |
|---|---|---|---|
| ols_1 | 2 | 8.2e-14 | pass |
| ols_2 | 2 | 9.6e-14 | pass |
| ols_3 | 2 | 6.8e-14 | pass |
| ols_4 | 2 | 6.3e-14 | pass |
| ols_5 | 2 | 2.5e-14 | pass |
| ols_6 | 2 | 2.5e-14 | pass |
| ols_7 | 2 | 8.2e-14 | pass |
| ols_8 | 2 | 3.6e-14 | pass |
| ols_9 | 2 | 3.6e-14 | pass |
| weighted_ols_1 | 2 | 5.4e-14 | pass |
| weighted_ols_2 | 2 | 5.4e-14 | pass |
| weighted_ols_3 | 2 | 5.4e-14 | pass |
| weighted_ols_4 | 2 | 5.5e-14 | pass |
| weighted_ols_5 | 2 | 5.2e-14 | pass |
| weighted_ols_6 | 2 | 5.2e-14 | pass |
| weighted_ols_7 | 2 | 5.4e-14 | pass |
| weighted_ols_8 | 2 | 5.4e-14 | pass |
| weighted_ols_9 | 2 | 5.4e-14 | pass |
| no_intercept_ols_1 | 2 | 2.8e-14 | pass |
| no_intercept_ols_2 | 2 | 2.8e-14 | pass |
| no_intercept_ols_3 | 2 | 2.8e-14 | pass |
| no_intercept_ols_4 | 2 | 2.8e-14 | pass |
| no_intercept_ols_5 | 2 | 2.6e-14 | pass |
| no_intercept_ols_6 | 2 | 2.6e-14 | pass |
| no_intercept_ols_7 | 2 | 2.8e-14 | pass |
| no_intercept_ols_8 | 2 | 2.8e-14 | pass |
| no_intercept_ols_9 | 2 | 2.8e-14 | pass |
| offset_ols_1 | 2 | 7.0e-14 | pass |
| offset_ols_2 | 2 | 7.0e-14 | pass |
| offset_ols_3 | 2 | 7.0e-14 | pass |
| offset_ols_4 | 2 | 7.0e-14 | pass |
| offset_ols_5 | 2 | 6.9e-14 | pass |
| offset_ols_6 | 2 | 6.8e-14 | pass |
| offset_ols_7 | 2 | 7.0e-14 | pass |
| offset_ols_8 | 2 | 7.0e-14 | pass |
| offset_ols_9 | 2 | 7.0e-14 | pass |
| missing_ols_1 | 2 | 9.7e-14 | pass |
| missing_ols_2 | 2 | 9.7e-14 | pass |
| missing_ols_3 | 2 | 9.7e-14 | pass |
| missing_ols_4 | 2 | 9.7e-14 | pass |
| missing_ols_5 | 2 | 5.0e-14 | pass |
| missing_ols_6 | 2 | 4.9e-14 | pass |
| missing_ols_7 | 2 | 9.7e-14 | pass |
| missing_ols_8 | 2 | 9.7e-14 | pass |
| missing_ols_9 | 2 | 9.7e-14 | pass |
| two_clusters_1 | 2 | 5.2e-14 | pass |
| two_clusters_2 | 2 | 5.2e-14 | pass |
| two_clusters_3 | 2 | 5.2e-14 | pass |
| two_clusters_4 | 2 | 5.2e-14 | pass |
| two_clusters_5 | 2 | 8.0e-13 | pass |
| two_clusters_6 | 2 | 8.1e-13 | pass |
| two_clusters_7 | 2 | 5.2e-14 | pass |
| two_clusters_8 | 2 | 5.2e-14 | pass |
| two_clusters_9 | 2 | 5.2e-14 | pass |
| missing_iv_1 | 2 | 2.1e-14 | pass |
| missing_iv_2 | 2 | 2.1e-14 | pass |
| missing_iv_3 | 2 | 2.2e-14 | pass |
| missing_iv_4 | 2 | 2.2e-14 | pass |
| missing_iv_5 | 2 | 2.7e-14 | pass |
| missing_iv_6 | 2 | 2.7e-14 | pass |
| missing_iv_7 | 2 | 2.1e-14 | pass |
| missing_iv_8 | 2 | 2.0e-14 | pass |
| missing_iv_9 | 2 | 2.1e-14 | pass |
| iv_1 | 2 | 2.4e-14 | pass |
| iv_2 | 2 | 2.0e-14 | pass |
| iv_3 | 2 | 2.0e-14 | pass |
| iv_4 | 2 | 3.3e-14 | pass |
| iv_5 | 2 | 1.1e-14 | pass |
| iv_6 | 2 | 1.1e-14 | pass |
| iv_7 | 2 | 2.4e-14 | pass |
| iv_8 | 2 | 5.4e-14 | pass |
| iv_9 | 2 | 2.1e-14 | pass |
| weighted_iv_1 | 2 | 2.9e-14 | pass |
| weighted_iv_2 | 2 | 2.2e-14 | pass |
| weighted_iv_3 | 2 | 2.4e-14 | pass |
| weighted_iv_4 | 2 | 2.9e-14 | pass |
| weighted_iv_5 | 2 | 2.8e-14 | pass |
| weighted_iv_6 | 2 | 2.7e-14 | pass |
| weighted_iv_7 | 2 | 2.9e-14 | pass |
| weighted_iv_8 | 2 | 2.8e-14 | pass |
| weighted_iv_9 | 2 | 2.3e-14 | pass |
| no_intercept_iv_1 | 2 | 6.4e-14 | pass |
| no_intercept_iv_2 | 2 | 6.4e-14 | pass |
| no_intercept_iv_3 | 2 | 6.5e-14 | pass |
| no_intercept_iv_4 | 2 | 6.6e-14 | pass |
| no_intercept_iv_5 | 2 | 5.3e-15 | pass |
| no_intercept_iv_6 | 2 | 7.1e-15 | pass |
| no_intercept_iv_7 | 2 | 6.4e-14 | pass |
| no_intercept_iv_8 | 2 | 5.7e-14 | pass |
| no_intercept_iv_9 | 2 | 5.8e-14 | pass |
| multiple_iv_1 | 2 | 2.3e-14 | pass |
| multiple_iv_2 | 2 | 2.3e-14 | pass |
| multiple_iv_3 | 2 | 6.8e-14 | pass |
| multiple_iv_4 | 2 | 6.8e-14 | pass |
| multiple_iv_5 | 2 | 1.2e-14 | pass |
| multiple_iv_6 | 2 | 1.4e-14 | pass |
| multiple_iv_7 | 2 | 2.3e-14 | pass |
| multiple_iv_8 | 2 | 2.3e-14 | pass |
| multiple_iv_9 | 2 | 2.5e-14 | pass |
| heating_iv_1 | 2 | 2.8e-13 | pass |
| heating_iv_2 | 2 | 1.6e-13 | pass |
| heating_iv_3 | 2 | 2.5e-13 | pass |
| heating_iv_4 | 2 | 1.8e-13 | pass |
| heating_ols_1 | 2 | 3.7e-13 | pass |
| heating_ols_2 | 2 | 3.7e-13 | pass |
| heating_ols_3 | 2 | 3.7e-13 | pass |
| heating_ols_4 | 2 | 3.6e-13 | pass |
All 214 comparisons
| Case | Implementation | Quantity | Criterion | Values | Max abs. error | Status |
|---|---|---|---|---|---|---|
| ols_1 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 8.2e-14 | pass |
| ols_2 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 9.6e-14 | pass |
| ols_3 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 6.8e-14 | pass |
| ols_4 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 6.3e-14 | pass |
| ols_5 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.5e-14 | pass |
| ols_6 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.5e-14 | pass |
| ols_7 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 8.2e-14 | pass |
| ols_8 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 3.6e-14 | pass |
| ols_9 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 3.6e-14 | pass |
| weighted_ols_1 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.4e-14 | pass |
| weighted_ols_2 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.4e-14 | pass |
| weighted_ols_3 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.4e-14 | pass |
| weighted_ols_4 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.5e-14 | pass |
| weighted_ols_5 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.2e-14 | pass |
| weighted_ols_6 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.2e-14 | pass |
| weighted_ols_7 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.4e-14 | pass |
| weighted_ols_8 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.4e-14 | pass |
| weighted_ols_9 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.4e-14 | pass |
| no_intercept_ols_1 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.8e-14 | pass |
| no_intercept_ols_2 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.8e-14 | pass |
| no_intercept_ols_3 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.8e-14 | pass |
| no_intercept_ols_4 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.8e-14 | pass |
| no_intercept_ols_5 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.6e-14 | pass |
| no_intercept_ols_6 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.6e-14 | pass |
| no_intercept_ols_7 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.8e-14 | pass |
| no_intercept_ols_8 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.8e-14 | pass |
| no_intercept_ols_9 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.8e-14 | pass |
| offset_ols_1 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 7.0e-14 | pass |
| offset_ols_2 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 7.0e-14 | pass |
| offset_ols_3 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 7.0e-14 | pass |
| offset_ols_4 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 7.0e-14 | pass |
| offset_ols_5 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 6.9e-14 | pass |
| offset_ols_6 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 6.8e-14 | pass |
| offset_ols_7 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 7.0e-14 | pass |
| offset_ols_8 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 7.0e-14 | pass |
| offset_ols_9 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 7.0e-14 | pass |
| missing_ols_1 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 881 | 9.7e-14 | pass |
| missing_ols_2 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 881 | 9.7e-14 | pass |
| missing_ols_3 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 881 | 9.7e-14 | pass |
| missing_ols_4 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 881 | 9.7e-14 | pass |
| missing_ols_5 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 875 | 5.0e-14 | pass |
| missing_ols_6 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 875 | 4.9e-14 | pass |
| missing_ols_7 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 881 | 9.7e-14 | pass |
| missing_ols_8 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 881 | 9.7e-14 | pass |
| missing_ols_9 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 881 | 9.7e-14 | pass |
| two_clusters_1 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 5.2e-14 | pass |
| two_clusters_2 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 5.2e-14 | pass |
| two_clusters_3 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 5.2e-14 | pass |
| two_clusters_4 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 5.2e-14 | pass |
| two_clusters_5 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 8.0e-13 | pass |
| two_clusters_6 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 8.1e-13 | pass |
| two_clusters_7 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 5.2e-14 | pass |
| two_clusters_8 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 5.2e-14 | pass |
| two_clusters_9 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 5.2e-14 | pass |
| missing_iv_1 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 875 | 2.1e-14 | pass |
| missing_iv_2 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 875 | 2.1e-14 | pass |
| missing_iv_3 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 875 | 2.1e-14 | pass |
| missing_iv_4 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 875 | 2.2e-14 | pass |
| missing_iv_5 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 869 | 2.7e-14 | pass |
| missing_iv_6 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 869 | 2.7e-14 | pass |
| missing_iv_7 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 875 | 2.1e-14 | pass |
| missing_iv_8 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 875 | 2.0e-14 | pass |
| missing_iv_9 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 875 | 2.1e-14 | pass |
| iv_1 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.4e-14 | pass |
| iv_2 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.0e-14 | pass |
| iv_3 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.0e-14 | pass |
| iv_4 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 3.3e-14 | pass |
| iv_5 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 1.1e-14 | pass |
| iv_6 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 1.1e-14 | pass |
| iv_7 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.4e-14 | pass |
| iv_8 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.4e-14 | pass |
| iv_9 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.1e-14 | pass |
| weighted_iv_1 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.9e-14 | pass |
| weighted_iv_2 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.2e-14 | pass |
| weighted_iv_3 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.4e-14 | pass |
| weighted_iv_4 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.9e-14 | pass |
| weighted_iv_5 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.7e-14 | pass |
| weighted_iv_6 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.7e-14 | pass |
| weighted_iv_7 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.9e-14 | pass |
| weighted_iv_8 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.8e-14 | pass |
| weighted_iv_9 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.3e-14 | pass |
| no_intercept_iv_1 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 6.3e-14 | pass |
| no_intercept_iv_2 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 6.4e-14 | pass |
| no_intercept_iv_3 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 6.4e-14 | pass |
| no_intercept_iv_4 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 6.5e-14 | pass |
| no_intercept_iv_5 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 5.3e-15 | pass |
| no_intercept_iv_6 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 7.1e-15 | pass |
| no_intercept_iv_7 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 6.3e-14 | pass |
| no_intercept_iv_8 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 5.7e-14 | pass |
| no_intercept_iv_9 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 5.8e-14 | pass |
| multiple_iv_1 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 888 | 2.1e-14 | pass |
| multiple_iv_2 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 888 | 2.1e-14 | pass |
| multiple_iv_3 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 888 | 6.8e-14 | pass |
| multiple_iv_4 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 888 | 6.8e-14 | pass |
| multiple_iv_5 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 1.2e-14 | pass |
| multiple_iv_6 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 1.4e-14 | pass |
| multiple_iv_7 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 888 | 2.1e-14 | pass |
| multiple_iv_8 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 888 | 2.3e-14 | pass |
| multiple_iv_9 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 888 | 2.3e-14 | pass |
| heating_iv_1 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 5,682 | 2.8e-13 | pass |
| heating_iv_2 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 5,682 | 1.6e-13 | pass |
| heating_iv_3 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 5,682 | 2.5e-13 | pass |
| heating_iv_4 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 5,682 | 1.8e-13 | pass |
| heating_ols_1 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 5,682 | 3.7e-13 | pass |
| heating_ols_2 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 5,682 | 3.7e-13 | pass |
| heating_ols_3 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 5,682 | 3.7e-13 | pass |
| heating_ols_4 | native | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 5,682 | 3.6e-13 | pass |
| ols_1 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 8.2e-14 | pass |
| ols_2 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 9.6e-14 | pass |
| ols_3 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 6.8e-14 | pass |
| ols_4 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 6.3e-14 | pass |
| ols_5 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.5e-14 | pass |
| ols_6 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.5e-14 | pass |
| ols_7 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 8.2e-14 | pass |
| ols_8 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 3.6e-14 | pass |
| ols_9 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 3.6e-14 | pass |
| weighted_ols_1 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.4e-14 | pass |
| weighted_ols_2 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.4e-14 | pass |
| weighted_ols_3 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.4e-14 | pass |
| weighted_ols_4 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.5e-14 | pass |
| weighted_ols_5 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.2e-14 | pass |
| weighted_ols_6 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.2e-14 | pass |
| weighted_ols_7 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.4e-14 | pass |
| weighted_ols_8 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.4e-14 | pass |
| weighted_ols_9 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.4e-14 | pass |
| no_intercept_ols_1 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.8e-14 | pass |
| no_intercept_ols_2 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.8e-14 | pass |
| no_intercept_ols_3 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.8e-14 | pass |
| no_intercept_ols_4 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.8e-14 | pass |
| no_intercept_ols_5 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.6e-14 | pass |
| no_intercept_ols_6 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.6e-14 | pass |
| no_intercept_ols_7 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.8e-14 | pass |
| no_intercept_ols_8 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.8e-14 | pass |
| no_intercept_ols_9 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.8e-14 | pass |
| offset_ols_1 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 7.0e-14 | pass |
| offset_ols_2 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 7.0e-14 | pass |
| offset_ols_3 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 7.0e-14 | pass |
| offset_ols_4 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 7.0e-14 | pass |
| offset_ols_5 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 6.9e-14 | pass |
| offset_ols_6 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 6.8e-14 | pass |
| offset_ols_7 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 7.0e-14 | pass |
| offset_ols_8 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 7.0e-14 | pass |
| offset_ols_9 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 7.0e-14 | pass |
| missing_ols_1 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 881 | 9.7e-14 | pass |
| missing_ols_2 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 881 | 9.7e-14 | pass |
| missing_ols_3 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 881 | 9.7e-14 | pass |
| missing_ols_4 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 881 | 9.7e-14 | pass |
| missing_ols_5 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 875 | 5.0e-14 | pass |
| missing_ols_6 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 875 | 4.9e-14 | pass |
| missing_ols_7 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 881 | 9.7e-14 | pass |
| missing_ols_8 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 881 | 9.7e-14 | pass |
| missing_ols_9 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 881 | 9.7e-14 | pass |
| two_clusters_1 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 5.2e-14 | pass |
| two_clusters_2 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 5.2e-14 | pass |
| two_clusters_3 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 5.2e-14 | pass |
| two_clusters_4 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 5.2e-14 | pass |
| two_clusters_5 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 8.0e-13 | pass |
| two_clusters_6 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 8.1e-13 | pass |
| two_clusters_7 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 5.2e-14 | pass |
| two_clusters_8 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 5.2e-14 | pass |
| two_clusters_9 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 893 | 5.2e-14 | pass |
| missing_iv_1 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 875 | 2.1e-14 | pass |
| missing_iv_2 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 875 | 2.1e-14 | pass |
| missing_iv_3 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 875 | 2.2e-14 | pass |
| missing_iv_4 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 875 | 2.2e-14 | pass |
| missing_iv_5 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 869 | 1.2e-14 | pass |
| missing_iv_6 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 869 | 1.2e-14 | pass |
| missing_iv_7 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 875 | 2.1e-14 | pass |
| missing_iv_8 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 875 | 2.0e-14 | pass |
| missing_iv_9 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 875 | 2.1e-14 | pass |
| iv_1 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.4e-14 | pass |
| iv_2 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 1.4e-14 | pass |
| iv_3 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.0e-14 | pass |
| iv_4 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 3.3e-14 | pass |
| iv_5 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 8.9e-15 | pass |
| iv_6 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 1.1e-14 | pass |
| iv_7 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.4e-14 | pass |
| iv_8 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 5.4e-14 | pass |
| iv_9 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 1.6e-14 | pass |
| weighted_iv_1 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.9e-14 | pass |
| weighted_iv_2 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.2e-14 | pass |
| weighted_iv_3 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.4e-14 | pass |
| weighted_iv_4 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.9e-14 | pass |
| weighted_iv_5 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.8e-14 | pass |
| weighted_iv_6 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.7e-14 | pass |
| weighted_iv_7 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.9e-14 | pass |
| weighted_iv_8 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.8e-14 | pass |
| weighted_iv_9 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 921 | 2.3e-14 | pass |
| no_intercept_iv_1 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 6.4e-14 | pass |
| no_intercept_iv_2 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 6.4e-14 | pass |
| no_intercept_iv_3 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 6.5e-14 | pass |
| no_intercept_iv_4 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 6.6e-14 | pass |
| no_intercept_iv_5 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 3.6e-15 | pass |
| no_intercept_iv_6 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 3.6e-15 | pass |
| no_intercept_iv_7 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 6.4e-14 | pass |
| no_intercept_iv_8 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 5.7e-14 | pass |
| no_intercept_iv_9 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 5.8e-14 | pass |
| multiple_iv_1 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 888 | 2.3e-14 | pass |
| multiple_iv_2 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 888 | 2.3e-14 | pass |
| multiple_iv_3 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 888 | 6.8e-14 | pass |
| multiple_iv_4 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 888 | 6.8e-14 | pass |
| multiple_iv_5 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 8.9e-15 | pass |
| multiple_iv_6 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 882 | 8.9e-15 | pass |
| multiple_iv_7 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 888 | 2.3e-14 | pass |
| multiple_iv_8 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 888 | 2.3e-14 | pass |
| multiple_iv_9 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 888 | 2.5e-14 | pass |
| heating_iv_1 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 5,682 | 2.8e-13 | pass |
| heating_iv_2 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 5,682 | 1.6e-13 | pass |
| heating_iv_3 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 5,682 | 2.5e-13 | pass |
| heating_iv_4 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 5,682 | 1.8e-13 | pass |
| heating_ols_1 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 5,682 | 3.7e-13 | pass |
| heating_ols_2 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 5,682 | 3.7e-13 | pass |
| heating_ols_3 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 5,682 | 3.6e-13 | pass |
| heating_ols_4 | polyfill | OLS/IV covariance and inference | |x − r| ≤ 1e-9 + 1e-7 × |r| | 5,682 | 3.6e-13 | pass |
Limitations
Known differences
- Cluster inference uses G-1 degrees of freedom, explicitly computed in the reference generator.
- IV first-stage, Wu-Hausman, and Sargan diagnostics retain their iid definitions.
- Newey-West uses explicit lag, retained row order, Bartlett weights, and prewhite=FALSE.
Reproduction
From the repository root
Rscript docs/verifications/vcov.R
python3 docs/verifications/compare_vcov.py
- Raw record
- site/verifications/vcov.json
- Full results
- docs/verifications/vcov-results.json
- Input data
- tests/fixtures/vcov-r.json