Estimates a covariance matrix from a data matrix Y using empirical Bayes
matrix factorization (flashier). Falls back to an identity matrix on failure
if error_cache is provided.
Usage
compute_cov_flash(Y, error_cache = NULL)
Arguments
- Y
Numeric matrix (samples x conditions).
- error_cache
Optional file path to save diagnostics on FLASH failure.
When NULL (default), errors propagate; when set, saves a list with data
and message to this path and falls back to the identity matrix.
Value
A covariance matrix of dimension ncol(Y) x ncol(Y), rescaled by
column standard deviations.