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
general: use df_resid of results instance for inference #1203
e15f26b in #1189 also adjusts res.model.df_resid. This is not good, because we don't want to change the underlying model which can be attached to several robust covariance results instances
Instead we should change all methods in the Results classes that access model.df_resid to access the results df_resid instead.
One possible problem: results.df_resid is not defined for base.LikelihoodModel,
it's a cached attribute in RegressionResults
GLM and RLM set it as simple attribute in __init__
GenericLikelihoodModel also sets it in __init__
update: L1CountResults and similar L1xxxResults also modify .model.df_resid in the Results.__init__
also the same in GenericLikelihoodModelResults and ARResults
Do we have any stale state or state spill-over problems?
a grep shows many usages of .model.df_resid across model areas.
at least genmod and regression have unit tests for assert_equal(self.res1.model.df_resid, self.res2.df_resid) which will not hold anymore for results instances with some cluster robust covariances.
Activity
josef-pkt commentedon Nov 24, 2013
a grep shows many usages of
.model.df_residacross model areas.at least genmod and regression have unit tests for
assert_equal(self.res1.model.df_resid, self.res2.df_resid)which will not hold anymore for results instances with some cluster robust covariances.REF: don't use `.model.df_resid` in results, see statsmodels#1203
josef-pkt commentedon Nov 24, 2013
update: there are actually not so many
.model.df_residoutside of the unit tests and__init__.refactored in PR #1189
I didn't change setting
self.model.df_residin L1xxxResults, GenericLikelihoodModelResults and ARResultsREF: don't use `.model.df_resid` in results, see #1203
REF: don't use `.model.df_resid` in results, see statsmodels#1203
jbrockmendel commentedon Oct 5, 2017
Partially addressed by #3949
jbrockmendel commentedon Oct 5, 2017
Looks like the only remaining places this happens are in base.model and ar_model