% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/interactions.R
\name{tl_interaction_effects}
\alias{tl_interaction_effects}
\title{Calculate partial effects based on a model with interactions}
\usage{
tl_interaction_effects(model, var, by_var, at_values = NULL, intervals = TRUE)
}
\arguments{
\item{model}{A tidylearn model object}

\item{var}{Variable to calculate effects for}

\item{by_var}{Variable to calculate effects by (interaction variable)}

\item{at_values}{Named list of values at which to hold other variables}

\item{intervals}{Logical; whether to include confidence intervals}
}
\value{
For numeric \code{var}: a list with \code{effects} (data frame of
predicted values across the variable range for each level of
\code{by_var}) and \code{slopes} (data frame with estimated slopes and
standard errors per level). For categorical \code{var}: a data frame of
predicted values at each factor level for each level of \code{by_var}.
}
\description{
Calculate partial effects based on a model with interactions
}
