For those stumbling across this: With the reprex from GitHub - l-gorman/projpred_issue_reprex: A reproducible example for an issue being encountered in the ProjPred Package (which features a smaller dataset, a smaller reference model, and 2-fold CV), we received the error
Error in if (any(edgevals <- 0 < bdiff & bdiff < boundary.tol)) { :
missing value where TRUE/FALSE needed
It turned out that this is due to #323 (for which I will add a warning in projpred) and can be avoided by setting nterms_max = 16
(in this reference model, there are 17 predictor terms when not counting the intercept and when counting the two group-level terms as one (because their inclusion is forced in a common fashion by combining them via +
), so the full model has 17 predictor terms and we then want to cut off the search at 17 - 1 = 16 terms).
Furthermore, issue #346 is probably one of the reasons why the computations take so long in this case (in projpred:::search_forward()
, it is already the creation of the list of candidate models—for a given submodel size—which takes very long).