% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stats_tests.R
\name{nonparametric.test}
\alias{nonparametric.test}
\title{Perform Nonparametric Group Comparison}
\usage{
nonparametric.test(df)
}
\arguments{
\item{df}{A data frame containing at least two columns:
\describe{
\item{expression}{Numeric vector of gene expression values.}
\item{group}{Character or factor vector with exactly two group labels.}
}}
}
\value{
A named list with two elements:
\describe{
\item{p.value}{Numeric. P-value from the Wilcoxon rank-sum test.}
\item{test}{Character. Name of the test used (\code{"Wilcoxon rank-sum"}).}
}
}
\description{
Conducts a Wilcoxon rank-sum test (Mann-Whitney U test) to compare
expression values between two groups without assuming normality.
}
\details{
This test is useful as a robustness check against parametric methods
such as the t-test, especially when data are skewed or contain outliers.
The result is used by \code{analyze.gene()} to populate the
\code{robustness} field of its return value.
}
\examples{
\donttest{
analysis.df <- data.frame(
  expression = c(1.2, 2.3, 1.8, 2.1, 3.4, 2.9, 3.1, 2.7,
                 1.5, 2.0, 1.9, 2.4),
  group      = rep(c("normal", "RCC"), each = 6)
)
res <- nonparametric.test(analysis.df)
res$p.value
}

}
