gg_tensor {pammtools} | R Documentation |
Plot tensor product effects
Description
Given a gam model this convenience function returns a ggplot2
object
depicting 2d smooth terms specified in the model as heat/contour plots. If
more than one 2d smooth term is present individual terms are faceted.
Usage
gg_tensor(x, ci = FALSE, ...)
Arguments
x |
a fitted |
ci |
A logical value indicating whether confidence intervals should be
calculated and returned. Defaults to |
... |
Further arguments passed to |
See Also
Examples
g <- mgcv::gam(Sepal.Length ~ te(Sepal.Width, Petal.Length), data=iris)
gg_tensor(g)
gg_tensor(g, ci=TRUE)
gg_tensor(update(g, .~. + te(Petal.Width, Petal.Length)))
[Package pammtools version 0.5.93 Index]