When there are missing covariates, a prognostic regression using those covariates as independent variables can't be used to generate response predictions. But if you had a second, backup regression that did not use those covariates as predictors, you might use the first version when it works and fall back to the second when it didn't. The medley function of the medley package automates the fitting of a given regression and one or more backups excluding covariates subject to missingness, and provides a predict() method for generating the corresponding predictions.
It would be nice to be able to accept medley objects in cov_adj()'s model=slot. Or at least those that assemble fitted models of types we can otherwise accommodate ascov_adj() model's, such as lm's, glm's, glmrobs and so forth.
This calls for planning on two levels - spelling out how to build the $A_{11}$ and $A_{21}$ matrices and the estfun object from those of the primary and backup regressions; spelling out the needed .make_PreSandwichLayer() method, and adjustments to underlying S4 object (if/as needed).
When there are missing covariates, a prognostic regression using those covariates as independent variables can't be used to generate response predictions. But if you had a second, backup regression that did not use those covariates as predictors, you might use the first version when it works and fall back to the second when it didn't. The medley function of the medley package automates the fitting of a given regression and one or more backups excluding covariates subject to missingness, and provides a
predict()method for generating the corresponding predictions.It would be nice to be able to accept
medleyobjects in cov_adj()'smodel=slot. Or at least those that assemble fitted models of types we can otherwise accommodate ascov_adj()model's, such aslm's,glm's,glmrobs and so forth.This calls for planning on two levels - spelling out how to build the$A_{11}$ and $A_{21}$ matrices and the estfun object from those of the primary and backup regressions; spelling out the needed
.make_PreSandwichLayer()method, and adjustments to underlying S4 object (if/as needed).