Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAs must be omitted for predict function to work #10

Closed
wengers11 opened this issue Oct 26, 2017 · 1 comment
Closed

NAs must be omitted for predict function to work #10

wengers11 opened this issue Oct 26, 2017 · 1 comment

Comments

@wengers11
Copy link

@wengers11 wengers11 commented Oct 26, 2017

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.

merliseclyde added a commit that referenced this issue Apr 5, 2018
@merliseclyde
Copy link
Owner

@merliseclyde merliseclyde commented Apr 5, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.