cov_flash: Perform Empirical Bayes Matrix Factorization using flashier,...

cov_flashR Documentation

Perform Empirical Bayes Matrix Factorization using flashier, and return a list of candidate covariance matrices

Description

Perform Empirical Bayes Matrix Factorization using flashier, 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,
  greedy_args = list(),
  backfit_args = list()
)

Arguments

data

A “mash” data object.

factors

If factors = "default", the factors and loadings are both unconstrained. If factors = "nonneg", the factors are constrained to be non-negative, and the loadings are unconstrained.

subset

Data samples (rows) used to estimate the covariances. Sset to NULL to use all the data.

remove_singleton

If remove_singleton = TRUE, factors corresponding to singleton matrices will be removed from the output.

tag

How to name the covariance matrices.

output_model

The fitted flash model will be saved to this file (using saveRDS).

greedy_args

List containing additional parameters passed to flashier::flash_greedy.

backfit_args

List containing additional parameters passed to flashier::flash_backfit.

Value

A list of covariance matrices.

Examples

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


mashr documentation built on Oct. 18, 2023, 5:08 p.m.