tl_auto_interactions: Find important interactions automatically

View source: R/interactions.R

tl_auto_interactionsR Documentation

Find important interactions automatically

Description

Find important interactions automatically

Usage

tl_auto_interactions(
  data,
  formula,
  top_n = 3,
  min_r2_change = 0.01,
  max_p_value = 0.05,
  exclude_vars = NULL
)

Arguments

data

A data frame containing the data

formula

A formula specifying the base model without interactions

top_n

Number of top interactions to return

min_r2_change

Minimum change in R-squared to consider

max_p_value

Maximum p-value for significance

exclude_vars

Character vector of variables to exclude from interaction testing

Value

A tidylearn model with important interactions


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