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

bas.predict error with a single covariate #68

Closed
AleCarminati opened this issue Mar 17, 2023 · 2 comments
Closed

bas.predict error with a single covariate #68

AleCarminati opened this issue Mar 17, 2023 · 2 comments
Assignees
Labels

Comments

@AleCarminati
Copy link

Describe the bug
When you create a BAS linear model with a single covariate and then you try to predict new data (with se.fit=T) the function returns the following error:
Error in array(STATS, dims[perm]) : 'dims' cannot be of length 0

To Reproduce

data("Hald")
hald.gprior =  bas.lm(Y ~ X2, data=Hald, alpha=13, prior="g-prior")
predict(hald.gprior, newdata=Hald, estimator="BPM", se.fit=TRUE)

Expected behavior
The function should return the 95% intervals for the prediction of new data.

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
  • R Version: 4.1.2
@merliseclyde merliseclyde self-assigned this Mar 17, 2023
@merliseclyde
Copy link
Owner

Thanks! - that is a bug in the function to produce the standard errors. and affects all estimator options.

merliseclyde added a commit that referenced this issue Mar 17, 2023
@merliseclyde
Copy link
Owner

Dev version 1.6.5 passes current tests; closing issue for now.

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

No branches or pull requests

2 participants