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
{{ message }}
Repository navigation
REF: add cov_type robust covariance to fit method #1418
wls_prediction_std needs to be added to unit tests for robust cov.
after the first commit, I have a scale that is much too large. I only saw it because the confidence intervals in regression_plots.plot_fit looked too wide.
also wls_prediction_std needs to be checked that it uses the robust cov
To the first point above: There is a fragile structure in cov_type='cluster' because I overwrite df_resid to be the number of groups. Following Stata the asymptotics is with respect to the number of groups keeping the other dimension fixed.
This causes a bug in scale if Results instance is adjusted in fit, because the scale method uses the results.df_resid and not the results.model.df_resid. The latter is unchanged.
I could switch scale to use model.df_resid, but the whole thing looks a bit fragile.
related messy structure: we have scale as argument to RegressionResult.__init__, but then it is still overwritten by the method (cached attribute). I don't find an issue where I mentioned this before.
For cluster we need to separate those methods where df_resid is adjusted to be ngroups and where it is the original. If I don't adjust results.df_resid, then I have test failures in at least conf_int, ttest and fvalue.
additional cached attributes that use df_resid, but most likely don't have test coverage for robust cov are rsquared_adj and msresid, maybe there are more.
Activity
josef-pkt commentedon Feb 24, 2014
To the first point above: There is a fragile structure in
cov_type='cluster'because I overwrite df_resid to be the number of groups. Following Stata the asymptotics is with respect to the number of groups keeping the other dimension fixed.This causes a bug in scale if Results instance is adjusted in fit, because the scale method uses the results.df_resid and not the results.model.df_resid. The latter is unchanged.
I could switch scale to use model.df_resid, but the whole thing looks a bit fragile.
josef-pkt commentedon Feb 24, 2014
related messy structure: we have scale as argument to
RegressionResult.__init__, but then it is still overwritten by the method (cached attribute). I don't find an issue where I mentioned this before.josef-pkt commentedon Feb 24, 2014
For cluster we need to separate those methods where df_resid is adjusted to be ngroups and where it is the original. If I don't adjust results.df_resid, then I have test failures in at least conf_int, ttest and fvalue.
additional cached attributes that use df_resid, but most likely don't have test coverage for robust cov are rsquared_adj and msresid, maybe there are more.