% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Kruskal_test.R
\name{test.kruskal}
\alias{test.kruskal}
\title{Kruskal-Wallis Test with Dunn Post-hoc}
\usage{
test.kruskal(
  ...,
  title = "Kruskal-Wallis + Dunn",
  xlab = "Group",
  ylab = "Value",
  style = c("boxplot", "violin", "mono", "halfeye"),
  adjust = c("bonferroni", "holm", "BH"),
  help = FALSE,
  verbose = TRUE
)
}
\arguments{
\item{...}{Numeric vectors representing groups, or a data frame with
two or more columns (each column is treated as a group).}

\item{title}{Character. Plot title.}

\item{xlab}{Character. X-axis label.}

\item{ylab}{Character. Y-axis label.}

\item{style}{Character. Plot style. One of:
\code{"boxplot"}, \code{"violin"}, \code{"mono"}, or \code{"halfeye"}.}

\item{adjust}{Character. Method for p-value adjustment in Dunn's test.
One of \code{"bonferroni"}, \code{"holm"}, or \code{"BH"}.}

\item{help}{Logical. If \code{TRUE}, displays a short help message and exits.}

\item{verbose}{Logical. If \code{TRUE}, prints formatted statistical results
to the console.}
}
\value{
Invisibly returns a list with the following components:
\describe{
\item{type}{Test type.}
\item{H}{Kruskal-Wallis H statistic.}
\item{df}{Degrees of freedom.}
\item{p}{Global test p-value.}
\item{epsilon_sq}{Epsilon-squared effect size.}
\item{epsilon_ci}{Bootstrap confidence interval for effect size.}
\item{means_sd}{Group means and standard deviations.}
\item{dunn}{Dunn post-hoc results.}
\item{significant_pairs}{Significant pairwise comparisons.}
\item{data}{Long-format data used in the analysis.}
}
}
\description{
Performs the Kruskal-Wallis rank-sum test for comparing three or more
independent groups, followed by Dunn's post-hoc test with multiple
comparison adjustment.
}
\details{
This function is a non-parametric alternative to one-way ANOVA and is
recommended when normality or homoscedasticity assumptions are violated.
}
\examples{
set.seed(123)

n <- 25

df <- data.frame(
  control    = rexp(n, rate = 1),
  treatment1 = rexp(n, rate = 0.6),
  treatment2 = rgamma(n, shape = 2, scale = 1)
)

test.kruskal(df)

}
