Skip to contents

Fit a mashr model on a chosen partition using a supplied prior covariance list and residual correlation, returning the fitted model. This is the fit step (mash_fit's first step): following Urbut et al. 2019 the mixture weights are learned on the representative "random" partition, and the resulting model is then applied to the strong / target set by mashPosterior.

Usage

mashModelFit(
  sumStatsList,
  alpha,
  priorCovariances,
  vhat = NULL,
  fitOn = c("random", "strong"),
  outputLevel = 4L,
  inputScale = c("auto", "beta", "z"),
  setSeed = 999
)

Arguments

sumStatsList

Named list (or S4Vectors::SimpleList) of QtlSumStats / GwasSumStats; must contain the fitOn entry.

alpha

mash alpha (forwarded to mashr::mash_set_data()).

priorCovariances

The prior covariance list (U) to fit with – e.g. the $U of a mashPriorCovariances result.

vhat

Residual correlation matrix (V); NULL -> identity.

fitOn

Partition to learn the mixture weights on: "random" (default, the standard unbiased choice) or "strong".

outputLevel

mashr::mash() outputlevel (default 4 – the full model mashPosterior consumes).

inputScale

SumStats -> matrix conversion scale.

setSeed

Integer seed, or NULL to leave the ambient RNG untouched.

Value

The fitted mashr model (the mashr::mash() object).