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

getCyclopsProfileLogLikelihood crashes when all slope values are NA #76

Open
azimov opened this issue Jun 28, 2024 · 0 comments
Open

getCyclopsProfileLogLikelihood crashes when all slope values are NA #76

azimov opened this issue Jun 28, 2024 · 0 comments

Comments

@azimov
Copy link

azimov commented Jun 28, 2024

PR incoming that is a potential solution but it appears to fail unit tests so this likely requires a deeper understanding of the function that I have.

This error occurs in getCyclopsProfileLogLikelihood when a model is IllConditioned:

Message:  missing value where TRUE/FALSE needed

(Apologies for lack of details, getting a full stack trace out of a Strategus run takes time).

Upon live debugging it appears to be this line:

if (resetsPerformed < maxResets && !all(slopes[2:length(slopes)] < slopes[1:(length(slopes)-1)])) {

Live debugging shows that the Model is illconditioned and all values of slopes are NA(presumably because of the gradient calculations on the lines above).

I will try to get a reproducible example but my quick tests of the PR branch appear to show that this is because of all being called on a vector of NAs. A better solution may be more pre-validation.

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

No branches or pull requests

1 participant