# s

From brms v1.10.0
by PaulChristian Buerkner

##### Defining smooths in brms formulae

Functions used in definition of smooth terms within a model formulae. The function does not evaluate a (spline) smooth - it exists purely to help set up a model using spline based smooths.

##### Usage

`s(...)`t2(...)

##### Arguments

##### Details

The function defined here are just simple wrappers of the respective functions of the mgcv package.

##### See Also

##### Examples

```
# NOT RUN {
# simulate some data
dat <- mgcv::gamSim(1, n = 200, scale = 2)
# fit univariate smooths for all predictors
fit1 <- brm(y ~ s(x0) + s(x1) + s(x2) + s(x3),
data = dat, chains = 2)
summary(fit1)
plot(marginal_smooths(fit1), ask = FALSE)
# fit a more complicated smooth model
fit2 <- brm(y ~ t2(x0, x1) + s(x2, by = x3),
data = dat, chains = 2)
summary(fit2)
plot(marginal_smooths(fit2), ask = FALSE)
# }
# NOT RUN {
# }
```

*Documentation reproduced from package brms, version 1.10.0, License: GPL (>= 3)*

### Community examples

Looks like there are no examples yet.