This resolves several bugs related to submodel fits of class subfit, see the message of commits fcf1408ca7dee7a15e69f3fe3d77241866e5f50d and d08920a345d49112567e00bdda36f17ed8d26a88. The main problem was that in predict.subfit(), argument xlev of model.matrix() was not used. Unfortunately, deriving these xlevels at fitting time is not really straightforward, which is the reason why this PR adds a bunch of code for deriving these at the beginning of fit_glm_ridge_callback() and search_L1().
All of the issues resolved by commit fcf1408ca7dee7a15e69f3fe3d77241866e5f50d can be reproduced using the following code:
This resolves several bugs related to submodel fits of class
subfit
, see the message of commits fcf1408ca7dee7a15e69f3fe3d77241866e5f50d and d08920a345d49112567e00bdda36f17ed8d26a88. The main problem was that inpredict.subfit()
, argumentxlev
ofmodel.matrix()
was not used. Unfortunately, deriving thesexlevels
at fitting time is not really straightforward, which is the reason why this PR adds a bunch of code for deriving these at the beginning offit_glm_ridge_callback()
andsearch_L1()
.All of the issues resolved by commit fcf1408ca7dee7a15e69f3fe3d77241866e5f50d can be reproduced using the following code:
(All of the calls following a commented
debug()
call failed before this PR and succeed afterwards.)For the issue resolved by commit d08920a345d49112567e00bdda36f17ed8d26a88, see the corresponding commit message for reproducibility instructions.