statsmodels / statsmodels/statsmodels

BUG emplike `emplikeAFT.predict` uses endog

Open
#2,005 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I don't think this can be right

    def predict(self, params, endog=None):
        if endog is None:
            endog = self.endog
        return np.dot(endog, params)

The results class doesn't define predict and doesn't inherit, so I guess it has never been used.

separation between the model class emplikeAFT and the results class AFTResults looks strange.
fitting is params of the results class.

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.

Research direction

Start at the emplikeAFT.predict method shown in the issue and inspect how emplikeAFT and AFTResults are separated and how fitting supplies parameters. Determine which class should expose prediction and which input it should use; the issue is done when prediction behavior and the model/results boundary are made consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.