Compute Weights Using the Bayesian LASSO (BGLR)
Source:R/regularizedRegressionWrappers.R
bLassoWeights.RdFits a Bayesian LASSO linear regression model via `BGLR::BGLR` (the "BL" model, Park & Casella 2008) and returns the posterior mean of the marker effects. This is the same "B-Lasso" implementation benchmarked in Kim et al. (2022). Note that this is distinct from `bayesLWeights`, which uses a different Bayesian LASSO implementation backed by `qgg`.
Details
Defaults for `nIter`, `burnIn`, and `thin` are larger than BGLR's package defaults to better accommodate high-LD cis-eQTL windows; override to recover the package defaults.
Examples
data(eqtlRegionExample)
X <- eqtlRegionExample$X[, 1:30]
y <- eqtlRegionExample$yRes
bLassoWeights(X, y)
#> [1] -0.012786209 -0.014965511 0.004589594 -0.001719917 -0.002140031
#> [6] -0.004376499 -0.002379093 0.009676513 0.003157114 0.002878278
#> [11] -0.002083803 -0.014519030 -0.004664857 0.004456937 -0.003118781
#> [16] 0.011073404 -0.002756225 -0.001891732 0.005421637 -0.002788131
#> [21] -0.003113740 -0.005375932 -0.001297681 -0.002309460 -0.005257552
#> [26] -0.005429895 -0.013878315 -0.002288976 0.006018754 0.004099956