% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stats_tests.R
\name{compute.ci}
\alias{compute.ci}
\title{Compute Confidence Interval for Effect Size}
\usage{
compute.ci(df, alpha = 0.05, n.boot = 1000)
}
\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 indicating group membership.}
}}

\item{alpha}{Numeric. Significance level used to compute the confidence
interval bounds. Default is \code{0.05}, yielding a 95 percent CI.}

\item{n.boot}{Integer. Number of bootstrap resamples to perform.
Default is \code{1000}.}
}
\value{
A named list with two elements:
\describe{
\item{lower}{Lower bound of the bootstrapped confidence interval.}
\item{upper}{Upper bound of the bootstrapped confidence interval.}
}
}
\description{
Estimates a confidence interval for Cohen's d using bootstrap resampling.
This provides a measure of uncertainty around the effect size estimate,
which is especially useful when sample sizes are small or distributions
deviate from normality.
}
\details{
The function repeatedly resamples the input data with replacement and
recomputes Cohen's d for each resample. The confidence interval is
derived from the empirical distribution of bootstrapped effect sizes
using the percentile method.
}
\examples{
\donttest{
# Build a minimal example data frame
analysis.df <- data.frame(
  expression = c(1.2, 2.3, 1.8, 2.1, 3.4, 2.9, 3.1, 2.7),
  group = rep(c("normal", "RCC"), each = 4)
)
ci <- compute.ci(analysis.df, alpha = 0.05, n.boot = 100)
}

}
