Skip to content

REF/ENH: change df_resid to include extra parameters in MLE, add k_null #8481

Open

Description

@josef-pkt

many related issues, and old problem, which finally needs a solution
main design FAQ-D issue: #1723

bug in NB #1624
consistent definitions in GenericLikelihoodModel #8476

This is mainly to have a consistent definition of df_resid, df_model and df_null/k_null, and k_params, especially for more models with extra parameters and multi-link models.
Existing models with extra params like NB, GP, ... should already have correct results statistics like aic, llr_pvalue, so those will return the same values as before if df_resid is redefined, the change for those is internal.

for discrete, e.g. count models, include k_extra in df_resid so we don't need to add it specifically in aic, bic and other

My current thinking is that this should not affect the definitions in GLM (at least not the default). We treat GLM/1-parameter-LEF as QMLE or moment estimator like OLS.

Activity

  1. added this to the 0.15 milestone on Oct 29, 2022
  2. josef-pkt commented on Oct 29, 2022

    @josef-pkt
    MemberAuthor

    related: we need to take into account that there might be a constrained fit.
    fitted k_params is not equal to len(params)

    e.g.
    TestMyParetoRestriction in miscmodels test_generic_mle has unit test for df_resid. I'm not sure that's correct.
    Also we have base fit_constrained, _fit_zeros, _fit_collinear, but I don't remember if that already works for some models with extra shape params, k_extra>0, like NB, GPP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions