cov_flash: Perform Empirical Bayes Matrix Factorization via FLASH and...

Description Usage Arguments Value Examples

View source: R/data2cov.R

Description

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

Usage

1
2
3
4
5
6
7
8
9
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

1
2
# See https://stephenslab.github.io/mashr/articles/flash_mash.html
# for an example

mashr documentation built on May 24, 2021, 1:06 a.m.