You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No, weights in WLS are var_weights. That's how they are specified for llf and scale. We changed this so that (inverse of) weights are equivalent to a diagonal covariance/sigma matrix
It's just that for params and cov_params, or any quadratic forms, the definition and interpretation of weights doesn't matter.
Also nobs and df_resid are defined by number of rows and not by weights.
So should we have a separate freq_weights argument for WLS? The issue is that the survey code expects a freq_weights argument in the model initializer. Right now we have to test which model class we are in and adjust accordingly.
I think special casing WLS in the survey method would be better for now until we have a clean solution.
Adding freq_weights to OLS/WLS is not completely trivial for all the extra results and methods. It shouldn't be very difficult, but will require a large number of unit tests and most likely that we carry around both freq_weights and var_weights in several methods.
I would prefer to wait changing OLS/WLS until we have settled on the design and definitions in GLM, e.g. #3856 is still open and the sandwich cov_types are not fully supported yet for freq_weights.
It would be possible to add freq_weights to WLS as alias for weights with a big warning to users that it is not really supported. If freq_weights in OLS/WLS are released in 0.10, there would be time to implement it properly at least for most results.
Activity
josef-pkt commentedon Aug 28, 2017
No, weights in WLS are
var_weights. That's how they are specified for llf and scale. We changed this so that (inverse of) weights are equivalent to a diagonal covariance/sigma matrixIt's just that for params and cov_params, or any quadratic forms, the definition and interpretation of weights doesn't matter.
Also nobs and df_resid are defined by number of rows and not by weights.
kshedden commentedon Aug 28, 2017
So should we have a separate freq_weights argument for WLS? The issue is that the survey code expects a freq_weights argument in the model initializer. Right now we have to test which model class we are in and adjust accordingly.
josef-pkt commentedon Aug 28, 2017
I think special casing WLS in the survey method would be better for now until we have a clean solution.
Adding freq_weights to OLS/WLS is not completely trivial for all the extra results and methods. It shouldn't be very difficult, but will require a large number of unit tests and most likely that we carry around both freq_weights and var_weights in several methods.
I would prefer to wait changing OLS/WLS until we have settled on the design and definitions in GLM, e.g. #3856 is still open and the sandwich cov_types are not fully supported yet for freq_weights.
It would be possible to add freq_weights to WLS as alias for weights with a big warning to users that it is not really supported. If freq_weights in OLS/WLS are released in 0.10, there would be time to implement it properly at least for most results.