flashr: Empirical Bayes Factor Analysis in R
Methods for matrix factorization based on Empirical Bayes Matrix Factorization. The name of the package, "flashr," comes from "Factors and Loadings by Adaptive SHrinkage in R".
Note: This code is in development. The interface is fairly stable but not guaranteed to stay the same.
Copyright (c) 2017-2018, Matthew Stephens and Wei Wang.
Citing this work
If you find that this R package is useful for your work, please cite our paper:
W. Wang and M. Stephens, 2018. Empirical Bayes matrix factorization. arXiv:1802.06931.
Follow these steps to quickly get started using
install.packages("devtools") library(devtools) install_github("firstname.lastname@example.org",build_vignettes = TRUE)
This command should automatically retrieve and install the
ebnmpackages from GitHub (and possibly other packages). If it does not, install
ebnmseparately using devtools:
Note: If you are interested in attempting to reproduce the results in the Wang and Stephens (2018) manuscript, the flashr release that most closely matches the package used in the paper is version 0.4-10. This release can be installed by running the following in R:
Optionally, install MOSEK and the Rmosek package, for faster model fitting. See the ashr GitHub repository for details.
Run a few toy examples illustrating the
Explore the introductory flashr vignette:
See the online documentation to learn more about the
pkgdown::build_site(mathjax = FALSE)in R to build the website using pkgdown. Make sure you are connected to the Internet while running these commands.