- Operating System: MacOS
- brms Version: 2.14.4

In the new Gelman et al (2020) text, we see the following simulation on pp. 159–160.

```
# define the sample size
N <- 100
# define the number of continuous variables
K <- 10
# make an array of K continuous variables
X <- array(runif(N * K, 0, 1), c(N, K))
# make an additional dummy predictor
z <- sample(c(0, 1), N, replace = TRUE)
# set the data-generating values
a <- 1
b <- 1:K
theta <- 5
sigma <- 2
# simulate the outcome
y <- a + X %*% b + theta * z + rnorm(N, 0, sigma)
# save the results in a data frame
fake <- data.frame(
X = X,
y = y,
z = z)
```

They then fit the full model with `rstanarm::stan_glm()`

like so.

```
fit1 <- rstanarm::stan_glm(y ~ X + z, data = fake)
```

The resulting summary shows a model fit with an intercept, a `z`

slope, and 10 additional slopes for `X1`

through `X10`

.

I’m not sure I have the proper language for this, so I’ll apologize up front. But is it possible to use this array-oriented syntax in a `formula`

argument within `brm()`

? My initial naive attempt failed.

```
# this fails
fit2 <- brms::brm(y ~ X + z, data = fake)
```

Instead, I get the following error message: “Error: The following variables are missing in ‘data’: ‘X’”