Commit d682bf4
Zero aweight scores for zero-weight rows, fix self.df_ effective count
Fix aweight HC1/clustered path: zero out score rows where weights==0
so zero-weight observations don't contribute to the sandwich meat
(mirrors the TSL survey vcov implementation).
Fix LinearRegression.df_: use positive-weight count for pweight/aweight
with zeros, matching compute_robust_vcov effective-n rule.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent c6c2c38 commit d682bf4
1 file changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1064 | 1064 | | |
1065 | 1065 | | |
1066 | 1066 | | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
1067 | 1070 | | |
1068 | 1071 | | |
1069 | 1072 | | |
| |||
1870 | 1873 | | |
1871 | 1874 | | |
1872 | 1875 | | |
1873 | | - | |
| 1876 | + | |
| 1877 | + | |
1874 | 1878 | | |
1875 | | - | |
1876 | | - | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
1877 | 1884 | | |
1878 | 1885 | | |
1879 | 1886 | | |
| |||
0 commit comments