% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/interactions.R
\name{tl_auto_interactions}
\alias{tl_auto_interactions}
\title{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{
\item{data}{A data frame containing the data}

\item{formula}{A formula specifying the base model without interactions}

\item{top_n}{Number of top interactions to return}

\item{min_r2_change}{Minimum change in R-squared to consider}

\item{max_p_value}{Maximum p-value for significance}

\item{exclude_vars}{Character vector of variables to exclude
from interaction testing}
}
\value{
A tidylearn model object (class \code{"tidylearn_model"}) fitted
with the top significant interaction terms added to the formula.
The interaction test results and selected interactions are stored as
attributes \code{"interaction_tests"} and
\code{"selected_interactions"}.
}
\description{
Find important interactions automatically
}
\examples{
\donttest{
model <- tl_auto_interactions(mtcars, mpg ~ wt + hp + cyl, top_n = 2)
}
}
