Repeated cells/visits do not establish donor-level inference. Posterior score uncertainty is ignored. CorShrink delegates pairwise estimation to its native API and reports symmetry/PSD properties rather than claiming them universally.
Usage
factor_cor(
fit,
engine,
factors = NULL,
metadata = NULL,
subset = NULL,
use = "complete.obs",
control = list()
)Arguments
- fit
Native fit or view.
- engine
Required pearson, spearman or corshrink.
- factors
Optional unique factor IDs.
- metadata
Optional aligned sample metadata retained for diagnostics.
- subset
Optional unique sample IDs.
- use
complete.obs, pairwise.complete.obs or everything for base methods.
- control
CorShrink native settings; bootstrap and inverse modes are unsupported.
Details
Origin: WRAPPER / call_only. Credits stats::cor; CorShrink entrypoints pending audit; use factor_provenance("factor_cor") for audited sources and runtime versions. Input units and basis are retained; display/conditional results do not establish biological replication.
Author
Mikhael Manurung; R Core Team (stats::cor); Kushal Dey; Matthew Stephens; Peter Carbonetto (CorShrink). Full source and dependency credits: https://github.com/mdmanurung/flashier-utils/blob/main/CREDITS.md.
Examples
if (FALSE) {
set.seed(3)
X <- tcrossprod(matrix(rnorm(48), 24, 2), matrix(rnorm(32), 16, 2)) +
matrix(rnorm(384, sd = 0.2), 24, 16)
dimnames(X) <- list(paste0("s", 1:24), paste0("g", 1:16))
fit <- fit_ebmf(X, "rows",
max_factors = 2, seed = 4, verbose = 0,
ebnm_fn = list(ebnm::ebnm_normal, ebnm::ebnm_point_laplace),
nullcheck = FALSE, backfit = TRUE, feature_scale = "simulated_centered_intensity"
)
view <- standardize_factors(fit)
factor_cor(view, "pearson")$correlation
}