Apply a fitted mashr model (from mashModelFit)
to a target SumStats set, returning the posterior matrices
(PosteriorMean, PosteriorSD, lfsr, ...). This is the
posterior step of the mash workflow – mash_fit's second step and
mash_posterior's per-analysis-unit computation.
Arguments
- model
A fitted mashr model (the
mashModelFitoutput).- sumStats
A single
QtlSumStats/GwasSumStats– the target (e.g. strong) set to compute posteriors on.- alpha
mash
alpha(match the fit).- vhat
Residual correlation matrix (
V);NULL-> identity.- excludeCondition
Character vector of condition (column) names to drop from the target AND the model before computing posteriors (the model's covariances are resized via
updateMashModelCov). Default none.- outputPosteriorCov
Return the full posterior covariance array (needed by
fitMashContrast). DefaultTRUE.- inputScale
SumStats -> matrix conversion scale.
Value
The mashr::mash_compute_posterior_matrices() result: a list of
PosteriorMean / PosteriorSD / lfsr / NegativeProb
(+ PosteriorCov when outputPosteriorCov = TRUE).