Community Methods

A machine-readable knowledge base of statistical and computational methods. Each entry is a Method Card: what a method can do, under what conditions, and how. Verified cards become available to the statLens Agent, and their authors are cited whenever they are used.

5
Published
5
Verified
0
In review
← All methods
statLens Method Card

ComBat: empirical Bayes batch effect adjustment

v3.60.0STATLENS VERIFIED

Removes known batch effects from high-dimensional data. It estimates an additive and a multiplicative batch effect for every feature and shrinks them with empirical Bayes, while preserving the biological covariates you specify. ComBat-seq applies the same idea to raw counts.

Category
Normalization / transformation
Analysis task
Other
Study designs
Multi-centre, Cross-sectional, Case-control, Cohort
Contributor
statLens team
Submitted
09 Nov 2026
Source
AI-drafted from the paper and package documentation; pending expert review

Scientific questions this method addresses

How do I remove technical batch effects (sequencing run, site, processing date) before combining samples?
Can I merge expression data from several studies or centres while keeping biological group differences?
Are my samples clustering by batch rather than by biology, and can that be corrected?

Statistical specification

Y_{ijg} = \alpha_g + X\beta_g + \gamma_{ig} + \delta_{ig}\,\varepsilon_{ijg}
Model family
Location/scale model with empirical Bayes shrinkage of batch parameters
Distribution
Gaussian
Link
Identity
Estimand
Batch-adjusted data, not a hypothesis test; per-feature batch location γ and scale δ are estimated and removed
Multiple testing
None / user-supplied
Assumptions
The batch of every sample is known; Batch effects are additive in the mean and multiplicative in the variance, and similar across features (shared prior); Biological groups are not confounded with batch: each batch contains a mix of groups; For ComBat, input is normalized and on a log scale; ComBat-seq takes raw counts
Sample size
Works with small batches; very unbalanced designs reduce reliability

Best used when

Batches are small, even a few samples each, thanks to the shrinkage
Studies or centres are combined for visualization, clustering or prediction
Batch labels are known and biological groups are balanced across batches

Do not use when

Batch is fully confounded with the biological condition, so adjustment removes the true signal
Batches are unknown (estimate hidden factors with SVA or RUV instead)
The adjusted data are used for differential testing when batch could simply be a covariate in the model; this can overstate significance
Test data in a prediction setting are adjusted together with training data (use a reference batch to avoid leakage)

Relationships

Typed edges to other Method Cards. These are what let statLens assemble multi-step workflows rather than single methods.

precedeslimmaAdjust for exploration and plots; for testing, prefer batch as a covariate in limma's design
alternative_toSVA / RUVSeqEstimate unknown batch or hidden factors when batch labels are missing
similar_toComBat-seqNegative binomial version for raw RNA-seq counts, in the same sva package (ComBat_seq)

Outputs

Mapped to the statLens standard statistical result, plus method-specific fields.

Standard fields
Method-specific
adjusted_matrix
Implementation
Distribution
R package (Bioconductor)
Package
sva 3.60.0
Dependencies
R (>= 3.2), mgcv, genefilter, BiocParallel
Repository
https://bioconductor.org/packages/sva/
License
Artistic-2.0
DOI
10.1093/biostatistics/kxj037
Paper
Adjusting batch effects in microarray expression data using empirical Bayes methods, Biostatistics 8(1):118–127, 2007
Citation

Adjusting batch effects in microarray expression data using empirical Bayes methods, Biostatistics 8(1):118–127, 2007

doi:10.1093/biostatistics/kxj037
Lifecycle
Draft
Submitted
Automated validation
Expert review
Verified
Published
Eligible for Model Selection