Extracts coefficients from an existing mr.mash fit or fits mr.mash from `X` and `Y`.
Usage
mrmashWeights(
mrmashFit = NULL,
X = NULL,
Y = NULL,
retainFit = FALSE,
fitDetail = c("slim", "full"),
...
)Arguments
- mrmashFit
Optional fitted mr.mash object.
- X
Genotype matrix. Required when `mrmashFit` is NULL.
- Y
Phenotype matrix. Required when `mrmashFit` is NULL.
- retainFit
If TRUE, attach (as the `"fit"` attribute of the returned weights) the parts of the mr.mash fit that `fineMappingPipeline` needs to rebuild the mvSuSiE reweighted mixture prior + residual variance: the original data-driven prior matrices (`dataDrivenPriorMatrices`), the fitted mixture weights (`w0`) and the residual covariance (`V`). Default FALSE.
- fitDetail
How much of the fit to retain when `retainFit = TRUE`. `"slim"` (default) keeps only the three reconstruction inputs above; the heavy coefficient matrix (`mu1`) is already returned as the weights, so it is not duplicated. `"full"` additionally retains the complete mr.mash fit under `$fit` (consistent with how susie fits are kept), at the cost of a larger payload.
- ...
Additional arguments passed to `mrmashWrapper()` when fitting.