Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for edge case when likelihood is infinite when profiling #72

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

schuemie
Copy link
Member

@schuemie schuemie commented Nov 9, 2023

The current code only checks if the log likelihood is NaN, but under some circumstances it can be -Inf, causing a 'missing value where TRUE/FALSE needed' error.

I added a fix and some unit tests that test both scenarios (NaN or -Inf).

@schuemie schuemie requested a review from msuchard November 9, 2023 09:02
Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (a2b3a95) 79.27% compared to head (14c8289) 79.24%.

❗ Current head 14c8289 differs from pull request most recent head 6527620. Consider uploading reports for the commit 6527620 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #72      +/-   ##
===========================================
- Coverage    79.27%   79.24%   -0.04%     
===========================================
  Files           56       56              
  Lines         7296     7298       +2     
===========================================
- Hits          5784     5783       -1     
- Misses        1512     1515       +3     
Files Coverage Δ
R/ModelFit.R 87.08% <42.85%> (+0.71%) ⬆️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@msuchard msuchard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks good and passes all tests!

@msuchard msuchard merged commit 862ff7e into develop Nov 9, 2023
10 checks passed
@schuemie
Copy link
Member Author

schuemie commented May 8, 2024

@msuchard could we have a release with this fix implemented? The current develop branch seems functional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants