% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/easy_regression.R
\name{easy_regression}
\alias{easy_regression}
\title{Run a Linear Regression with Automated Narrative Reporting}
\usage{
easy_regression(formula, data, alpha = 0.05)
}
\arguments{
\item{formula}{A \code{formula} object or a character string formula (e.g.,
\code{"mpg ~ wt + hp"}). Passed directly to \code{stats::lm()}.}

\item{data}{A data frame containing the variables referenced in \code{formula}.}

\item{alpha}{Significance threshold used in narrative generation. Default \code{0.05}.}
}
\value{
An object of class \code{"easystat_result"} (an R \code{list}) with:
  \describe{
    \item{\code{test_type}}{Character: \code{"regression"}}
    \item{\code{formula_str}}{Character string of the formula used}
    \item{\code{raw_model}}{The raw \code{lm} object for advanced use}
    \item{\code{coefficients_table}}{Tidy data frame of coefficients, SEs, t-stats, p-values}
    \item{\code{model_fit_table}}{Data frame with R\eqn{^2}, Adjusted R\eqn{^2}, F-statistic, p-value}
    \item{\code{explanation}}{Plain-language narrative string}
  }
}
\description{
Executes a standard OLS linear regression using \code{stats::lm()}, extracts
key metrics via the \code{broom} package, and automatically generates a
plain-language narrative explanation via the Narrative Generator Module.
}
\examples{
result <- easy_regression(mpg ~ wt + hp, data = mtcars)
print(result)

}
