Interperting the residual variance

In general, I recommend against interpreting the fraction of variance explained by residuals. This fraction is driven by:

  1. the particulars of the study design
  2. measurement precision (i.e. high read counts give more precise measurements)
  3. biological variability
  4. technical variability (i.e. batch effects).

If you have additional variables that explain variation in measured gene expression, you should include them in order to avoid confounding with your variable of interest. But a particular residual fraction is not ‘good’ or ‘bad’ and is not a good metric of determining whether more variables should be included.

Current GitHub issues

See GitHub page for up-to-date responses to users’ questions.

Session Info

## R version 4.4.0 beta (2024-04-15 r86425)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 22.04.4 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.19-bioc/R/lib/libRblas.so 
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
##  [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
## [10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## time zone: America/New_York
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] edgeR_4.2.0              pander_0.6.5             variancePartition_1.34.0
## [4] BiocParallel_1.38.0      limma_3.60.0             ggplot2_3.5.1           
## [7] knitr_1.46              
## 
## loaded via a namespace (and not attached):
##  [1] tidyselect_1.2.1    farver_2.1.1        dplyr_1.1.4         bitops_1.0-7       
##  [5] fastmap_1.1.1       digest_0.6.35       lifecycle_1.0.4     statmod_1.5.0      
##  [9] magrittr_2.0.3      compiler_4.4.0      rlang_1.1.3         sass_0.4.9         
## [13] tools_4.4.0         utf8_1.2.4          yaml_2.3.8          labeling_0.4.3     
## [17] plyr_1.8.9          KernSmooth_2.23-22  withr_3.0.0         purrr_1.0.2        
## [21] numDeriv_2016.8-1.1 BiocGenerics_0.50.0 grid_4.4.0          aod_1.3.3          
## [25] fansi_1.0.6         caTools_1.18.2      colorspace_2.1-0    scales_1.3.0       
## [29] gtools_3.9.5        iterators_1.0.14    MASS_7.3-60.2       cli_3.6.2          
## [33] mvtnorm_1.2-4       rmarkdown_2.26      generics_0.1.3      reshape2_1.4.4     
## [37] minqa_1.2.6         cachem_1.0.8        stringr_1.5.1       splines_4.4.0      
## [41] parallel_4.4.0      matrixStats_1.3.0   vctrs_0.6.5         boot_1.3-30        
## [45] Matrix_1.7-0        jsonlite_1.8.8      pbkrtest_0.5.2      locfit_1.5-9.9     
## [49] jquerylib_0.1.4     tidyr_1.3.1         snow_0.4-4          glue_1.7.0         
## [53] nloptr_2.0.3        codetools_0.2-20    stringi_1.8.3       gtable_0.3.5       
## [57] EnvStats_2.8.1      lme4_1.1-35.3       lmerTest_3.1-3      munsell_0.5.1      
## [61] tibble_3.2.1        remaCor_0.0.18      pillar_1.9.0        htmltools_0.5.8.1  
## [65] gplots_3.1.3.1      R6_2.5.1            Rdpack_2.6          evaluate_0.23      
## [69] lattice_0.22-6      Biobase_2.64.0      highr_0.10          rbibutils_2.2.16   
## [73] backports_1.4.1     RhpcBLASctl_0.23-42 broom_1.0.5         fANCOVA_0.6-1      
## [77] corpcor_1.6.10      bslib_0.7.0         Rcpp_1.0.12         nlme_3.1-164       
## [81] xfun_0.43           pkgconfig_2.0.3