Open AdrianRichter opened 3 years ago
The issue is based on the way the CIs are computed: A nested bootstrap method is used as seen in the manual under Details
Use a nested boostrap approach to compute pointwise confidence intervals for the predicted partial functions or regression parameters. The approach is further described in Hofner et al. (2016).
This means that a bootstrap sample is drwan and on this sample another bootstrap is used to determine the optimal mstop value for that subsample. In this inner bootstrap, there are indeed zero weights and hence the warning is correct.
I agree, though, that it is not optimal. Either one should change the way the bootstrap is drawn or one should suppress the warning. Unfortunately I don't have time to dig deeper here at the moment and to find the best solution.
When running the example:
The same no. of warnings is generated as bootstrap samples are specified. The warning says:
In cvrisk.mboost(mod, folds = cv(model.weights(mod), B = B.mstop), : zero weights
However, model.weights() of "linmod" is a vector of 1.