## Not run:
# set.seed(0)
# dat <- mgcv::gamSim(1, n = 200,scale = 2)
# fit <- brm(y ~ s(x0) + s(x1) + s(x2) + s(x3), data = dat)
# # show all smooth terms
# plot(marginal_smooths(fit), rug = TRUE, ask = FALSE)
# # show only the smooth term s(x2)
# plot(marginal_smooths(fit, smooths = "s(x2)"), ask = FALSE)
#
# # fit and plot a two-dimensional smooth term
# fit2 <- brm(y ~ t2(x0, x2), data = dat)
# marginal_smooths(fit2)
# ## End(Not run)
Run the code above in your browser using DataLab