The main function fails when there is missing data. The error message is not informative. I suggest you automatically subset to complete cases, as many other packages do. You can throw a warning when missing data was removed. Check out how the functions in rms package does this.
Thank you for the suggestion @Deleetdk . For now I added an argument na.action to bic.glm.formula which is set to na.omit by default. Will do the same for the data.frame and matrix classes.
The main function fails when there is missing data. The error message is not informative. I suggest you automatically subset to complete cases, as many other packages do. You can throw a warning when missing data was removed. Check out how the functions in rms package does this.
Created on 2021-01-18 by the reprex package (v0.3.0.9001)