Skip to content

GenericLikelihoodModel bootstrap requires exog #944

Closed

Description

@josef-pkt

calling bootstrap with a GenericLikelihood Results instance that doesn't have an exog raises an exception.

Activity

  1. Padarn commented on Apr 22, 2014

    @Padarn
    Contributor

    When does this come up? Do you have an example case?

  2. josef-pkt commented on Apr 22, 2014

    @josef-pkt
    MemberAuthor

    difficult question, I don't remember. The use case that I, most likely, looked at is estimating the parameters of a distribution that has fixed parameters and no exog, something similar to scipy distribution fit method, e.g. estimate the parameters of a mixture distribution by MLE.

    I can find or make up an example later today.

  3. Padarn commented on Apr 23, 2014

    @Padarn
    Contributor

    Ah okay - I wasn't familiar with this part of the code so couldn't think of a possible case to try. Will try myself if you don't find time.

  4. josef-pkt commented on Apr 24, 2014

    @josef-pkt
    MemberAuthor

    I'm fixing this together with #1434

  5. josef-pkt commented on May 22, 2018

    @josef-pkt
    MemberAuthor

    I don't see any change in 1434 that would affect this. (maybe I never committed that part)
    So this issue still open.

    nobs and df_resid: besides making summary more robust to nan and float, df_resid and nobs should be properly defined also in this case
    df_resid is also still required for t_test (even when it's not used)

  6. josef-pkt commented on May 22, 2018

    @josef-pkt
    MemberAuthor

    BUG for df_resid

    GenericLikelihoodModelResults checks for existence of df_model, but the model initialize sets df_resid to nan if exog is None.

            if hasattr(model, 'df_model'):
                self.df_model = model.df_model
            else:
                self.df_model = len(mlefit.params)
    

    something strange:
    I remember the setting of df_resid in GenericLikelihoodModelResults to be more complicated than it is in the current master, e.g. checking for the length of params and adjusting the exog_names parameter names for use in summary xname.

  7. josef-pkt commented on Jun 12, 2021

    @josef-pkt
    MemberAuthor

    I'm closing this
    bootstrap with exog=None works in #7488 (after I fix init_keys to recreate model, no exog related problems)

    res,summary() also works

    df_resid, df_model look fine but I haven't investigated much
    (only aic based on df_modelwc was wrong without k_constant, but I fix that also in #7488)

  8. added this to the 0.13 milestone on Sep 9, 2021
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

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions