Description Usage Arguments Details Value Examples
View source: R/conditional_smooths.R
Display smooth s
and t2
terms of models
fitted with brms.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 
x 
An object of class 
smooths 
Optional character vector of smooth terms
to display. If 
int_conditions 
An optional named 
prob 
A value between 0 and 1 indicating the desired probability to be covered by the uncertainty intervals. The default is 0.95. 
spaghetti 
Logical. Indicates if predictions should
be visualized via spaghetti plots. Only applied for numeric
predictors. If 
resolution 
Number of support points used to generate
the plots. Higher resolution leads to smoother plots.
Defaults to 
too_far 
Positive number.
For surface plots only: Grid points that are too
far away from the actual data points can be excluded from the plot.

ndraws 
Positive integer indicating how many
posterior draws should be used.
If 
draw_ids 
An integer vector specifying
the posterior draws to be used.
If 
nsamples 
Deprecated alias of 
subset 
Deprecated alias of 
probs 
(Deprecated) The quantiles to be used in the computation of
uncertainty intervals. Please use argument 
... 
Currently ignored. 
Twodimensional smooth terms will be visualized using either contour or raster plots.
For the brmsfit
method,
an object of class brms_conditional_effects
. See
conditional_effects
for
more details and documentation of the related plotting function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  ## 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(conditional_smooths(fit), rug = TRUE, ask = FALSE)
# show only the smooth term s(x2)
plot(conditional_smooths(fit, smooths = "s(x2)"), ask = FALSE)
# fit and plot a twodimensional smooth term
fit2 < brm(y ~ t2(x0, x2), data = dat)
ms < conditional_smooths(fit2)
plot(ms, stype = "contour")
plot(ms, stype = "raster")
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.