Skip to contents

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.3.0 (2023-04-21)
## Platform: x86_64-apple-darwin22.4.0 (64-bit)
## Running under: macOS 14.2.1
## 
## Matrix products: default
## BLAS:   /Users/gabrielhoffman/prog/R-4.3.0/lib/libRblas.dylib 
## LAPACK: /usr/local/Cellar/r/4.3.0_1/lib/R/lib/libRlapack.dylib;  LAPACK version 3.11.0
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## time zone: America/New_York
## tzcode source: internal
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## loaded via a namespace (and not attached):
##  [1] vctrs_0.6.3       cli_3.6.1         knitr_1.43        rlang_1.1.1       xfun_0.39        
##  [6] stringi_1.7.12    purrr_1.0.2       textshaping_0.3.6 jsonlite_1.8.5    glue_1.6.2       
## [11] rprojroot_2.0.3   htmltools_0.5.5   ragg_1.2.5        sass_0.4.6        rmarkdown_2.22   
## [16] evaluate_0.21     jquerylib_0.1.4   fastmap_1.1.1     yaml_2.3.7        lifecycle_1.0.3  
## [21] memoise_2.0.1     stringr_1.5.0     compiler_4.3.0    fs_1.6.2          systemfonts_1.0.4
## [26] digest_0.6.33     R6_2.5.1          magrittr_2.0.3    bslib_0.4.2       tools_4.3.0      
## [31] pkgdown_2.0.7     cachem_1.0.8      desc_1.4.2