6.7.6.3.2.1.2. statsmodels.sandbox.regression.onewaygls.OneWayLS.fitbygroups¶
-
OneWayLS.
fitbygroups
()[source]¶ Fit OLS regression for each group separately.
Returns: results are attached
olsbygroup : dictionary of result instance
the returned regression results for each group
sigmabygroup : array (ngroups,) (this should be called sigma2group ??? check)
mse_resid for each group
weights : array (nobs,)
standard deviation of group extended to the original observations. This can be used as weights in WLS for group-wise heteroscedasticity.