tl_plot_interaction: Plot interaction effects

View source: R/interactions.R

tl_plot_interactionR Documentation

Plot interaction effects

Description

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


tidylearn documentation built on Feb. 6, 2026, 5:07 p.m.