Skip to contents

Fits a BayesB linear regression model via `BGLR::BGLR` and returns the posterior mean of the marker effects. BayesB places a "spike-and-slab" mixture prior on each marker effect, with a scaled-t slab.

Usage

bayesBWeights(X, y, nIter = 10000, burnIn = 2000, thin = 5, probIn = 0.2, ...)

Arguments

X

A numeric matrix of predictors.

y

A numeric response vector.

nIter

Number of MCMC iterations. Default is 10000.

burnIn

Number of burn-in iterations. Default is 2000.

thin

Thinning interval. Default is 5.

probIn

Prior inclusion probability for each marker. Default is 0.2.

...

Additional arguments passed through to `BGLR::BGLR`.

Value

A numeric vector of length `ncol(X)` of variant weights.

Details

Defaults for `nIter`, `burnIn`, and `thin` are larger than BGLR's package defaults to better accommodate the high LD typical of cis-eQTL windows; see Kim et al. (2022) which observed that the BGLR defaults can be inadequate under correlated predictors. Override these arguments to recover the package defaults if desired.