Repository navigation
BUG: GenericLikelihood Results hasattr for df_resid is always true, s… - #8476
Conversation
|
one unit test fails, check that df_resid is nan That test was added in PR #5143 |
|
more problems I'm not sure yet if df_resid should subtract k_extra in 0.14 Similarly miscmodels.tmodel.TLinearModel has df_resid without k_extra |
2a26b34 to
2fa33aa
Compare
|
Warning, backwards incompatible change in definition: This changes now the definition of df_model to, essentially, k_params - k_constant - k_extra, i.e. only slope coefficients and not constant and extra parameters. This also changes in OrderedModel. Other changes affect subclasses of GenericLikelihoodModel in miscmodels. |
|
needs a note in release notes |
|
two new failures with latest change unit tests for aic fail, i.e. those aic are not robust to redefinition of df_model |
|
both DiscretizedModel and BetaModel explicitly define df_model in df_resid is explicitly set as nobs - number of params So, we just need to redefine df_model in those 2 models, and we need to add k_extra aic is inherited from GenericLikelihoodModelResults and Resultsmixin it uses the old df_modelwc in which I now also include k_extra: |
2fa33aa to
7c875e4
Compare
|
rerunning an old weibull, aft survival model notebook, Two ways to define df_model and df_resid to fix warnings about df mismatch
Results look correct with either method. |
|
unit tests are green 1 pep-8/flake failure looks almost ready to merge |
|
something like this for the release notes: The definition of model degrees of freedom, |
7c875e4 to
7beaa12
Compare
This fixes the immediate issue in #8475
no unit tests yet for it
df_model does not take into account that we have nonzero k_null.
see #8475 (comment)
There might still be other related problems for other, similar subclasses of GenericLikelihoodModel.