% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/easy_correlation.R
\name{easy_correlation}
\alias{easy_correlation}
\title{Correlation Analysis with Automated Narrative Reporting}
\usage{
easy_correlation(
  x,
  y = NULL,
  data = NULL,
  vars = NULL,
  method = "pearson",
  conf_level = 0.95,
  alpha = 0.05
)
}
\arguments{
\item{x}{A numeric vector, a data frame, OR a formula \code{~ x + y}.}

\item{y}{A numeric vector (paired with \code{x}). Ignored when \code{x}
is a formula or data frame.}

\item{data}{A data frame. Required when \code{x} is a formula.}

\item{vars}{Character vector of column names when \code{x} is a data frame
and pairwise analysis is desired. Default \code{NULL} = all numeric cols.}

\item{method}{Correlation method: \code{"pearson"} (default),
\code{"spearman"}, or \code{"kendall"}.}

\item{conf_level}{Confidence level for Pearson CI. Default \code{0.95}.}

\item{alpha}{Significance threshold for narrative. Default \code{0.05}.}
}
\value{
An \code{"easystat_result"} object.
}
\description{
Computes bivariate or pairwise correlations (Pearson, Spearman, or Kendall)
with significance tests and confidence intervals. For two variables a full
narrative is generated; for multiple variables a correlation matrix is
returned with a summary digest.
}
\examples{
result <- easy_correlation(~ mpg + wt, data = mtcars)
print(result)

result <- easy_correlation(mtcars, vars = c("mpg", "hp", "wt", "disp"))
print(result)

}
