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.
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
getCyclopsProfileLogLikelihoodwhen a model is IllConditioned:(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:
Cyclops/R/ModelFit.R
Line 966 in 22cf1b7
Live debugging shows that the Model is illconditioned and all values of
slopesareNA(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
allbeing called on a vector of NAs. A better solution may be more pre-validation.