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

predict.basglm error with newdata when se.fit = TRUE #50

Closed
aagaardk opened this issue Aug 14, 2020 · 0 comments
Closed

predict.basglm error with newdata when se.fit = TRUE #50

aagaardk opened this issue Aug 14, 2020 · 0 comments
Assignees

Comments

@aagaardk
Copy link

When trying to generate standard errors about fitted values using predict.basglm (i.e., se.fit = TRUE), the function issues an error when data are supplied to newdata:

Error in array(STATS, dims[perm]) :
'data' must be of a vector type, was 'NULL'
In addition: Warning message:
In max(cumDim[cumDim <= lstats]) :
no non-missing arguments to max; returning -Inf

Example which reproduces the behavior:

data(Pima.tr, package="MASS")
data(Pima.te, package="MASS")
Pima.bas = bas.glm(type ~ ., data=Pima.tr, n.models= 2^7, method="BAS",
           betaprior=CCH(a=1, b=nrow(Pima.tr)/2, s=0), family=binomial(),
           modelprior=uniform())
pred = predict(Pima.bas, newdata=Pima.te, se.fit = TRUE, top=1)  # Highest Probability model

Desktop (please complete the following information):

  • OS: Windows x86_64-w64-mingw32/x64 (64-bit)
  • R Version 4.0.2
  • RStudio 1.1.463
@merliseclyde merliseclyde self-assigned this Sep 9, 2020
merliseclyde added a commit that referenced this issue Sep 9, 2020
…#50,  however se.fit values returned are not correct in glms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants