TST/ENH: make sure and test that `fit(maxiter=0)` works with unchanged params

Open
#7,949 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
data, testing-qa

Research direction

Locate the existing checks for fit(maxiter=0) and the relevant fit entry points in statsmodels. Review how fixed parameters produce a results instance, then add general unit coverage showing that unchanged parameters are accepted and the resulting instance supports the intended diagnostics; run the affected test suite to confirm the behavior.

Written by the indexing model from the issue text.

Description

type-enh type-test

I think we will get some use cases where we want to get a results instance for fixed parameters.
Inference will only be correct under the assumption that the parameters are the MLE.

possible usecases

  • outliers: use params estimated with a robust estimator, We can use get_diagnostic, get_influence and similar to check the outlier candidates.
  • score_test: fixed, constrained params in results instance might be another possible version for implementing score_test.
    The current related versions of score_test require that either constrained params and everything related is provided as arguments, or the constrained estimate is available as result of fit_constrained
  • ...

AFAIR, we have some checks for maxiter=0, but no general unit tests.

Dominant language
Python
Stars
11.6k
Forks
3.6k
Avg merge
7h 37m
Merged PRs (30d)
96

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from statsmodels/statsmodels

All issues in statsmodels/statsmodels

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.