Skip to content

REF/DOC robust covariance, cov_type in fit #1922

Open

Description

@josef-pkt

PR #1870 adds generic function and adds robust covariance choice to fit

I'm pretty sure it's correctly connected based on unit tests and examples.
Inference based on the robust covariance is only unit tested on a few examples and is incomplete.
But there are also several parts separately unit tested instead of the various/all model results.
(add example to generic tests after GEE cov_type PR #1916 is in)

TODO:

  • documentation: both a rst file with summary and inclusion in the individual docstrings
    question: copy to each docstring (templated), or just point to central docstring?
    similar issue as for optimization option in discrete models.
  • check fit signatures for consistency: some models fit have explicit keywords cov_type, cov_kwds, some have it hidden in **kwargs
    All final classes should have explicit keywords. The base model classes have it in **kwargs because they don't apply to all cases. (e.g. NegativeBinomial needs to process cov_type after the fit parameters are not transformed any more)
  • check and decide on where use_t should be changed or attached. I started with it as part of cov_kwds and then moved it to an explicit keyword, next to cov_type, cov_kwds.
    use_t could or should be removed from cov_kwds (but we would need to add it everywhere separately.)

more:

  • regression still has it's own method get_robustcov_results. It should be possible to use the generic version now.
  • LikelihoodModelResults has _get_robustcov_results which is currently only for internal use, while get_robustcov_results is tested that it correctly creates a new instance.
  • cov_kwds: are currently not checked for extra or misspelled kwds, those are silently ignored.
    (it's not completely easy: need to pop, check if empty at end, but verify we didn't miss any)

ENH:

  • model specific cov_types: no cases yet. Should be possible by using model specific _get_robustcov_results method that takes care of some cov_types and delegates to generic/super for the standard ones. example overdispersed discrete.Poisson.
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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions