Repository navigation
ENH: all weights in GLM - #2879
Conversation
c1d81f3 to
7e9e9ed
Compare
|
2 nonactive |
|
all python 2 fail, integer division? |
|
cluster robust works but only without small sample correction. We need |
a983371 to
e52791f
Compare
|
rebased after #2877 merge (no weights in resid) test resids except |
|
I will merge this as is, without the promised weights. |
e52791f to
31d62ac
Compare
|
rebased and added warning should be ready to merge, but doesn't deliver what was intended here |
|
|
||
| # experimental support for freq_weights | ||
| if hasattr(results.model, 'freq_weights'): | ||
| if hasattr(results.model, 'freq_weights') and not cov_type == 'clu': |
There was a problem hiding this comment.
The first condition is now empty for GLM because it's currently always true for GLM. But it will be required for other models.
see
#2849 followup for GLM
#2848 SUMM issue for weights
The plan here is to implement 3 or 4 weight types in analogy to Stata
freq_weights,var_weights,prob_weights, and possiblyiweights. (fweights, aweights and pweights in Stata)robust cov_type HC and cluster should work correctly after this (not with same defaults as Stata)
other robust cov_types should be extended for var_weights and prob_weights (AFAICS, they would make sense in those cases, but in a later PR, it might not be easy for panel and HAC cov_types.)
freq_weights for GLM has been merged in #2835 (checked for cov_type nonrobust and HC)
status:
currently only unit tests, test cases from Stata are GLM-Poisson and WLS(
regress)Note: output from Stata contains some redundancies because several cases produce the same results. e.g. residuals don't include weights in Stata. I left them in to have separate test cases and for the record.