When building a BMA regression model and using the predict function (i.e. predict.bas) there can be no NAs or NULLs in new data set for prediction. If there are NAs, prediction returns
numeric(0)
attr(,"best")
integer(0)
Currently, recommend using complete.cases() to remove any NAs before prediction.
Hopefully, function can be made more robust by either calculating values for all partially NA rows or excluding NAs entirely with a warning issued.
Fixed in version 1.5.0 (on Github now). Allows user to specify na.action as an argument. Default is na.pass for now, which will return NA's for any rows that have NA's in the columns of the selected models.
When building a BMA regression model and using the predict function (i.e. predict.bas) there can be no NAs or NULLs in new data set for prediction. If there are NAs, prediction returns numeric(0) attr(,"best") integer(0)
Currently, recommend using complete.cases() to remove any NAs before prediction.
Hopefully, function can be made more robust by either calculating values for all partially NA rows or excluding NAs entirely with a warning issued.