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

Bug in bootstrap() (partial matching) #320

Closed
fweber144 opened this issue May 11, 2022 · 0 comments
Closed

Bug in bootstrap() (partial matching) #320

fweber144 opened this issue May 11, 2022 · 0 comments

Comments

@fweber144
Copy link
Collaborator

Partial matching requires to rename argument b of the internal bootstrap() function because it partially matches argument baseline:

options(mc.cores = parallel::detectCores(logical = FALSE))
data("df_gaussian", package = "projpred")
df_gaussian <- df_gaussian[1:41, ]
dat <- data.frame(y = df_gaussian$y, df_gaussian$x)
library(rstanarm)
rfit <- stan_glm(y ~ X1 + X2 + X3 + X4 + X5,
                 data = dat,
                 seed = 1140350788)

library(projpred)
vs <- varsel(rfit,
             nclusters = 3,
             nclusters_pred = 5,
             nterms_max = 1,
             seed = 46782345)
smmry <- summary(vs, stats = "rmse", b = 1, seed = 1234)

gives

Error in .validate_baseline(object$refmodel, baseline, deltas) : 
  Argument 'baseline' must be either 'ref' or 'best'.

Tested with projpred v2.1.1 (from CRAN).

fweber144 added a commit that referenced this issue May 12, 2022
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

1 participant