Estimate the mash Residual Correlation Matrix (Vhat)
Source:R/mashPipeline.R
mashResidualCorrelation.RdEstimate the residual (null) correlation matrix \(\hat V\) that
mashr::mash_set_data() consumes as V. Split out of
mashPipeline so the estimation logic lives in one place and is
reusable by the mixture-prior workflows.
Arguments
- sumStatsList
Named list (or
S4Vectors::SimpleList) ofQtlSumStats/GwasSumStats.method = "simple"needs a"null"entry;method = "mle"needs"random";method = "identity"reads only the condition count off"strong".- alpha
mash
alpha(forwarded tomashr::mash_set_data()).- method
Estimator, all on the
"null"partition unless noted."simple"= mashrestimate_null_correlation_simple();"identity"=diag(nConditions)(reads only"strong");"simple_specific"=Matrix::nearPD(cov(nullZ), corr = TRUE);"corshrink"=CorShrink::CorShrinkData()adaptive-shrinkage correlation (needs the CorShrink package);"mle"=mashr::mash_estimate_corr_em()on a random subset (needs"random"+priorCovariances).- priorCovariances
Prior
Ulist (required bymethod = "mle").- nSubset, maxIter
method = "mle"controls (random-subset size and EM iterations).- inputScale
SumStats -> matrix conversion scale (
"auto"/"beta"/"z").- setSeed
Integer seed, or
NULLto leave the ambient RNG stream untouched (howmashPipelinekeeps one continuous stream across its delegated calls).