Could somebody show me how to specify the search_terms list in the varsel() function?

## Here is a minimal example, model first …

library(rstanarm)

##
n ← 30

d ← 5

x ← matrix(rnorm(n*d), nrow=n)*

y ← x[,1] + 0.5rnorm(n)

data ← data.frame(x,y)

fit ← stan_glm(y ~ X1 + X2 + X3 + X4 + X5,

gaussian(),

data=data)

y ← x[,1] + 0.5

## Then varsel on all terms in the model works OK.

##
library(projpred)

vs1 ← varsel(fit)

vs1

But how to select a subset of terms?

vs2 ← varsel(fit, search_terms=c(“X1”,“X2”,“X3”), method=“forward”)

vs3 ← varsel(fit, search_terms=list(“X1”,“X2”,“X3”), method=“forward”)

tt ← terms(fit)

term_list ← as.list(attr(tt, “variables”))

vs4 ← varsel(fit, search_terms=tt, method=“forward”)

All of these show the same error message

Error in sub[“kl”, i] : incorrect number of dimensions

What am I doing wrong?