Plot interaction effects
Usage
tl_plot_interaction(
model,
var1,
var2,
n_points = 100,
fixed_values = NULL,
confidence = TRUE,
...
)Arguments
- model
A tidylearn model object
- var1
First variable in the interaction
- var2
Second variable in the interaction
- n_points
Number of points to use for continuous variables
- fixed_values
Named list of values for other variables in the model
- confidence
Logical; whether to show confidence intervals
- ...
Additional arguments to pass to predict()
Value
A ggplot object.
