this next line only includes varying intercepts
y~z+ bart(. - g) + (1 | g),
train = data,
test = data.test
)
```
To fit a stan4bart model that additionally accommodates varying slopes, the group structure term can be altered as follows to account for varying slopes across groups:

```