Learn R Programming

mashr (version 0.2.50)

cov_flash: Perform Empirical Bayes Matrix Factorization via FLASH and return a list of candidate covariance matrices

Description

Perform Empirical Bayes Matrix Factorization via FLASH and return a list of candidate covariance matrices

Usage

cov_flash(
  data,
  factors = c("default", "nonneg"),
  subset = NULL,
  remove_singleton = FALSE,
  tag = NULL,
  output_model = NULL,
  ...
)

Arguments

data

a mash data object

factors

"default" to use flashr default function to initialize factors, currently udv_si. "nonneg" to implement a non-negative constraint on the factors

subset

indices of the subset of data to use (set to NULL for all data)

remove_singleton

whether or not factors corresponding to singleton matrices should be removed from output

tag

specific a tag to name the contents in the return objects. You may want to choose different tags for different paramter combinations. Default is set to init_fn parameter in flashr::flash.

output_model

if specified a filename, the FLASH model will be saved to that file in RDS format.

additional parameters passed to flashr::flash

Value

Returns a list of covariance matrices

Examples

Run this code
# NOT RUN {
# See https://stephenslab.github.io/mashr/articles/flash_mash.html
# for an example

# }

Run the code above in your browser using DataLab