plot.tidygam.diff {tidygam} | R Documentation |
Plot methods for tidygam.diff objects
Description
Plotting methods for tidygam.diff
objects.
Usage
## S3 method for class 'tidygam.diff'
plot(x, ..., sig = TRUE, sig_col = "red", sig_alpha = 0.25)
Arguments
x |
A |
... |
Arguments passed to |
sig |
Shade the interval(s) where the difference smooth does not include 0 (default is |
sig_col |
Colour for the shading (default is |
sig_alpha |
Alpha level for the shading (default is |
Value
A ggplot
object.
Examples
library(mgcv)
set.seed(10)
data <- gamSim(4)
model <- gam(y ~ s(x2, by = fac) + s(x0), data = data)
model_diff <- get_difference(model, "x2", list(fac = c("1", "2")))
plot(model_diff)
[Package tidygam version 0.2.0 Index]