% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/module3_replicate.R
\name{calc_replicate_cv}
\alias{calc_replicate_cv}
\title{Replicate coefficient of variation per compound}
\usage{
calc_replicate_cv(
  data,
  value = "viability",
  compound_col = "compound_id",
  group_cols = NULL
)
}
\arguments{
\item{data}{An \code{hts_norm} object or a long data frame of well-level values.}

\item{value}{Name of the value column on which to compute the CV. Default
\code{"viability"} (more stable than inhibition, which can sit near zero).}

\item{compound_col}{Name of the compound column. Default \code{"compound_id"}.}

\item{group_cols}{Optional additional grouping columns (for example
\code{"cell_line"}) that define what counts as one compound series.}
}
\value{
A data frame with one row per compound (and any \code{group_cols}):
\code{compound_id}, the grouping columns, \code{n}, \code{mean}, \code{sd} and \code{cv} (percent).
}
\description{
Computes, for each compound, the coefficient of variation (CV, percent)
across its technical replicates (repeated wells, whether on the same plate or
across plates), a standard measure of assay reproducibility.
}
\examples{
norm <- norm_by_control(baseline_subtract(read_hts_plate(hts_primary_raw)))
cv <- calc_replicate_cv(norm)
head(cv[order(-cv$cv), ])

}
\seealso{
\code{\link[=calc_replicate_correlation]{calc_replicate_correlation()}}, \code{\link[=filter_bad_replicate]{filter_bad_replicate()}}
}
