Skip to content

Skip_hessian True now works in ConditionalLogit - #9181

Closed
Davidvandijcke wants to merge 1 commit into
statsmodels:mainfrom
Davidvandijcke:skip_hessian
Closed

Davidvandijcke wants to merge 1 commit into
statsmodels:mainfrom
Davidvandijcke:skip_hessian

Conversation

@Davidvandijcke

Copy link
Copy Markdown

The skip_hessian option did not work in ConditionalLogit.fit() because the ConditionalResults function tried to retrieve cov_params() from LikelihoodModel.fit() results.

@pep8speaks

Copy link
Copy Markdown

Hello @Davidvandijcke! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 124:1: W293 blank line contains whitespace

@josef-pkt

josef-pkt commented Mar 26, 2024 •

Copy link
Copy Markdown
Member

the fix looks correct to me, but I'm not familiar with the internals of these models.

Thanks for finding this and the PR

In general, skip_hessian was mainly introduced for internal use to avoid computing the hessian or cov_params more than once. I guess it's never directly unit tested.

@Davidvandijcke

Copy link
Copy Markdown
Author

That makes sense. For researchers, it can be a useful option for inspecting coefficient values in large models without having to compute the Hessian every time -- which can take many times longer.

@josef-pkt josef-pkt mentioned this pull request Jun 17, 2024
6 tasks
@bashtage bashtage self-assigned this Oct 16, 2024
@bashtage bashtage mentioned this pull request Oct 17, 2024
4 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants