Skip to contents

Use laplace/double exponential distribution as prior. This is equivalent to Bayesian LASSO.

Usage

bayesLWeights(
  X,
  y,
  Z = NULL,
  h2 = NULL,
  nit = 5000,
  nburn = 1000,
  nthin = 5,
  methodArgs = QggOptions()
)

Arguments

X

Numeric genotype / design matrix (samples x variants).

y

Numeric response (phenotype) vector of length nrow(X).

Z

Optional numeric matrix of fixed-effect covariates, or NULL.

h2

Numeric or NULL. Prior heritability; NULL leaves the engine's own default.

nit

Integer. Total MCMC iterations. Default 5000.

nburn

Integer. Burn-in iterations. Default 1000.

nthin

Integer. Thinning interval for retained MCMC samples. Default 5.

methodArgs

Options forwarded to qgg::gbayes, built with QggOptions. A bare list is refused: it cannot be checked against the engine, so a misspelled option would be silently ignored.

Value

A numeric vector of effect-size weights, one per variant (column of X); columns dropped for zero variance receive weight 0.

Examples

data(eqtlRegionExample)
X <- eqtlRegionExample$X[, 1:30]
y <- eqtlRegionExample$yRes
bayesLWeights(X, y)
#> Type of analysis performed: st-blr-individual-level-dense-ld
#>  [1]  1.078571e-04 -1.798186e-04  2.741577e-04 -1.352748e-04 -4.026247e-05
#>  [6] -1.914679e-05 -1.646616e-06 -1.069197e-04 -2.215334e-04  3.429555e-05
#> [11]  6.558959e-05 -2.018576e-05  4.186277e-05 -9.142562e-05 -1.012607e-04
#> [16]  1.485474e-04 -3.521251e-05 -1.146066e-04  2.697950e-05 -2.177092e-04
#> [21] -1.976173e-04 -6.641283e-05 -1.887935e-04  7.067308e-05 -6.288652e-05
#> [26] -8.289029e-05 -1.969750e-04  2.012290e-04 -1.226252e-04 -2.319659e-04